Hi alll.

I want to use the

HANDLE LoadImage(
HINSTANCE hinst, // handle to instance
LPCTSTR lpszName, // image to load
UINT uType, // image type
int cxDesired, // desired width
int cyDesired, // desired height
UINT fuLoad // load options


How do I get the HINSTANCE of another module? I do not own it, and I want to extract the Icon for temporary use. Also, if I save this handle, and the process is terminated, can I still use the extracted Icon?

Posted on 2001-11-01 20:01:48 by lackluster
hInstance could be your program or a DLL loaded into the process space of your program. You cannot use it on another process.
Posted on 2001-11-01 20:27:18 by comrade
maybe you can use the ExtractIcon function instead?
Posted on 2001-11-02 03:57:16 by beaster