|
Spherelin wrote: I am including the header files correctly in my implementation (.cpp) files
If you declare an instance of Node in your header file, then you need of course to include the header file of Node in thie file also (otherwise, the class Node is not recognized).
|
|
|
|
|
okay thanks - that fixed it!
hey so if I am entering a number via a statement like:
cin >> selection
how do I clear cin for the next use.
basically, user is going to enter a number (text entry program...for now). and then the next entry is going to be characters - like a name or state.
Right now, it seems to take the strike of the return key as the second entry.
THanks,
G
|
|
|
|
|
Dear All,
I am doing a project , which is an MFC application (MDI)
. Now its a standalone application with MS Access as the "Back end". I
have used ADO to made the connection.
Now I want to make this application to work for several clients
at the same time . I also want this application to communicate with 3
different types of Database .
1) MySQL
2) MS SQL Server
3) Oracle
My application should connect with any of the above DB , without making
any problem..
Can I make a general implementation by using ADO ?
What are the precautions I have to take to implement this ?
I think ,I have to face the problems of "concurrent write/reads " to
the DB...How can I overcome this ?
Now I am using Multiple SQL queries for multiple table updations.
Whether I can use transactions to avoid data loss during multiple table
updations...?
But I think MySQL won't support transactions...Is there any other
option?
Can any one pls give me a suggestion ...?
Thanks in advance...
vinsankar
|
|
|
|
|
Hi,
MySQL DO support transactions. Never doubt in a free software, just because it's free.
Using transactions is exactly what you need to handle concurrent access.
Regards
|
|
|
|
|
Hi,
Galatei wrote: MySQL DO support transactions. Never doubt in a free software, just because it's free.
Thanks for correcting me...
I have no doubt over the power of MySQL .
But Is there any other issues I have to handle to implement the Client/Server technology ?
Whether I can port my existing application (uses ADO with ACCESS) to the above implementation without spending much time for development ?
Is there any useful books or articles I have to read before designing it?
Thanks in advance...
vinsankar
|
|
|
|
|
I want to paste the same file version to many files in the "File" table of .MSI file using ORCA tool. But I can paste in a single cell only. I want to paste in multiple cells at a time. I hope somebody knows how to do. Becuase, it is difficult to paste in each cell if there are lot of files.
Thanks in Advance!
Suman
|
|
|
|
|
I used the Windows API function GetPrinterDriver() for getting the .ppd file for a specified printer. But for some printers this function is returning a .pdf file instead of .ppd file. can anyone help me to solve this and get a ppd file not pdf file. the following is the code i have written.
Note: In the following code. Only for printer named RIO-219 the Driver Name I am getting is .pdf file , for all others i am getting .ppd files.
void CPrinterDriverInformationDlg::OnBnClickedBtnPrintinfo()
{
// TODO: Add your control notification handler code here
HANDLE hPrinter;
CString strDriverName;
CString strDriverPPDFile;
DWORD dw;
DRIVER_INFO_4* pDriverInfo;
int index = 0;
// The following are the list of printers installed in my system.
const LPWSTR printerTbl[] =
{
L"Rio-219",
L"k2-212",
L"Den-203",
L"gl1010",
L"Hud-224",
NULL
};
while (printerTbl[index] != NULL)
{
if (OpenPrinter(printerTbl[index], &hPrinter, NULL))
{
if (! GetPrinterDriver(hPrinter, NULL, 4, NULL, 0, &dw))
{
BYTE* p = new BYTE[dw];
GetPrinterDriver(hPrinter, NULL, 4, p, dw, &dw);
pDriverInfo = (DRIVER_INFO_4*) p;
strDriverName = pDriverInfo->pName;
strDriverPPDFile = pDriverInfo->pDataFile;
delete [] p;
}
ClosePrinter(hPrinter);
}
++index;
}
}
thank you
|
|
|
|
|
how to retrieve URL's of opened browser windows?
|
|
|
|
|
hi,
One way i had tried out. Please follow the steps.
1. Enumerate all Destopwindows(Parent is Null)
2. Check the class Name of the window is "CabinetWClass" or "IEFrame"
3. If it is so and the browser is having only one window ie url edit window
then enumerate the child windows of the current window till u recive an edit window and the get the required text.
Like this i tried and got it. If u require any code i can post u later.
Thank you,
Manu
Manu
|
|
|
|
|
plz gimme some more detailed explaination or code..
Anyway thanks for replying me...
|
|
|
|
|
//[
BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam)
{
long lIDChild=0;
char szClasName[_MAX_PATH]={0};
::GetClassName(hwndChild, szClasName,50);
if (strcmp(szClasName,"Edit") ==0) //The Url Edit window (Assumed)
{
char szUrl[_MAX_PATH];//Url String
memset(szUrl, 0, _MAX_PATH);
::SendMessage(hwndChild, WM_GETTEXT, _MAX_PATH, (LPARAM)szUrl);
}
lIDChild = GetWindowLong(hwndChild, GWL_ID);
return TRUE;
}
BOOL CALLBACK EnumProc( HWND hwnd, LPARAM lParam )
{
char szClasName[_MAX_PATH];
DWORD dwThreadId;
HDESK hdesk;
dwThreadId = GetWindowThreadProcessId( hwnd, NULL );
memset(szClasName, 0, _MAX_PATH);
::GetClassName(hwnd, szClasName,50);
if ( (strcmp(szClasName, "CabinetWClass")==0) || (strcmp(szClasName, "IEFrame")==0) )//Explorer or IE window
{
EnumChildWindows(hwnd, EnumChildProc,(LPARAM) NULL); //Enumerate through its child windows
}
hdesk = GetThreadDesktop( dwThreadId );
if( hdesk && hdesk != (HDESK)lParam )
return FALSE;
return TRUE;
}
//]
void CWindTestDlg::OnOK()
{
HDESK hdesk;
hdesk = GetThreadDesktop( GetCurrentThreadId() );
EnumDesktopWindows( hdesk, EnumProc, (LPARAM)hdesk );
return;
}
Just try this. all the best,If any problems please let me know
Manu
|
|
|
|
|
I have a command "regsvr32 "c:\temp\temp.dll", I am executing that in my program by WinExec API, but that API only returns the result that it has executed application "RegSvr32.exe" or not, but i don't get the complete result i.e "regsvr32 "c:\temp\temp.dll" i.e temp.dll has been register sucessfully or not, any hint to get the complete result of a child process.
Warm Regards,
Mushq
|
|
|
|
|
You need to use CreateProcess instead.
It will give you a process handle in one of the structures you pass it.
If CreateProcess returns successfully, WaitForSingleObject the process handle (assuming you are not in a GUI thread) and then call the magic api function GetExitCodeProcess. Oh - and don't forget to CloseHandle on the returned process and thread handles.
HTH
Mike
|
|
|
|
|
It is working perfact.
Mike Thank you very much.
Warm Regards,
Mushq
|
|
|
|
|
I hope you have used this code.
WinExec("regsvr32 c:\\MyDll.dll",0);
If yes, It works perfectly(It show messagebox of succes or failure).
-- modified at 3:45 Friday 1st December, 2006
|
|
|
|
|
Dear Parsad, you are 100% right, but the problem is that I want to run that command in silent mode, with out prompting a message box.
Regards,
Mushq
|
|
|
|
|
then you need to pass this string.
"regsvr32 /s mydll.dll"
|
|
|
|
|
Not necessarily, WinExec("regsvr32 mydll.dll" , SW_HIDE), this can also work for silence.
|
|
|
|
|
NO , it wont(Try it with above code). Second parameter is for window based applications.
You need to mention /s .
As mentioned in MSDN, use CreateProcess , with command line options given.
|
|
|
|
|
Yes you are right, I am extremely sorry of my previous comments.
|
|
|
|
|
Would it not be easier to register the dll yourself (see below).
HINSTANCE hDll;
HRESULT hReply;
HRESULT (FAR *lpDll) (void);
hDll = LoadLibrary(szFile);
if (hDll > (HINSTANCE)32)
{
if (bRegistering)
{
lpDll = (HRESULT (FAR *) (void)) GetProcAddress(hDll, "DllRegisterServer");
}
else
{
lpDll = (HRESULT (FAR *) (void)) GetProcAddress(hDll, "DllUnregisterServer");
}
hReply = (*lpDll)();
if (hReply != 0)
{
}
}
FreeLibrary(hDll);
}
else
{
}
|
|
|
|
|
How can we use CString in WIN32 Application ??
Thanx in advance.
|
|
|
|
|
Why one would like to use CString in WIN32 application? Use std::string instead.
|
|
|
|
|
Define this, and you will have CString in Win32
#define _AFXDLL<br />
#include <afx.h><br />
#include <afxwin.h>
|
|
|
|
|
Make that
#define _AFXDLL<br />
#include <afx.h><br />
#include <afxwin.h><br />
|
|
|
|