Hi all,
Is there a simple way that I can retrieve the handle of a newly executed application that was launched with ShellExecute. Although ShellExecute returns a HINSTANCE it isnt a real HINSTANCE just an int value.
Thanks
This is a discussion on Retrieving the handle of shellexecute within the Windows Programming forums, part of the Platform Specific Boards category; Hi all, Is there a simple way that I can retrieve the handle of a newly executed application that was ...
Hi all,
Is there a simple way that I can retrieve the handle of a newly executed application that was launched with ShellExecute. Although ShellExecute returns a HINSTANCE it isnt a real HINSTANCE just an int value.
Thanks
Moved to windows.
In future, please post your windows specific questions to the Window Programming board.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Do you mean a process handle? With shellexecute, you could do it in a very hackish way looking for the window name to retrieve an hwnd and then enumerate windows until you find an hwnd that matches, and with shellexecuteex, you can do it in a little less hackish way by enumerating windows and comparing with the process id filled in the SHELLEXECUTEINFO structure. This thread has some example code.
Close IE programmatically
╔╗╔╦══╦╗╔╦══╦╗
║╚╝║╔╗║╚╝║╔╗║║
║╔╗║╠╣║╔╗║╠╣╠╣
╚╝╚╩╝╚╩╝╚╩╝╚╩╝
codez http://code.google.com/p/zxcvbn/