Hello.
Has loaded its own DLL into another process, so I have a variable: HINSTANCE.
I need to get the HWND (Window Handle).
How can I get it, knowing HINSTANCE?
Thank you and best regards.
HINSTANCE -> HWND
There's no direct relationship between one and the other. A given HINSTANCE can use multiple HWNDs and the API has no way of knowing which one you intend. The best way is to write a getter function that returns the HWND you want.
Our EnumWindows. This StackOverflow answer is probably as close as you can get to an answer. As mhagain said, there is not a 1 to 1 relationship.
http://stackoverflow.com/questions/3269390/how-to-get-hwnd-of-window-opened-by-shellexecuteex-hprocess/3269432#3269432
http://stackoverflow.com/questions/3269390/how-to-get-hwnd-of-window-opened-by-shellexecuteex-hprocess/3269432#3269432
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement