Hi,
How to find a running instance during installation? Any clues? please help.
regards
Deepak
Printable View
Hi,
How to find a running instance during installation? Any clues? please help.
regards
Deepak
hDeskWnd = GetDesktopWindow, gives the desktop window. All the the other windows are its children. Using the desktop window pointer,
while(null != (hChildWnd = (GetWindow(hDeskWnd ,5)))
{
GetWindowTextA(hChildWnd,strBuffer,bufLen);
Now compare the strBuffer to your window title which appears on the top left corner of your application, if it matches, your application is running
}
GetWindow - gives all the children of a given window, for desktop all the running application windows !!!
If you want to do it from Installation, check the option to call a dll function in the installation tool, the functions are in system32\user32.dll.
Good luck