James Hawkins wrote:
Maybe that only returns the hinstance of the process calling the module, and not the hinstance of the module itself.
Ofcourse it doesn't do that, how should it know from what module the call came from?
(Yes, there are ways. But they are hackish, wouldn't work always and this is not what MSDN says about this function anyway)
The right way is to store the HINSTANCE passed to DllMain on DLL_PROCESS_ATTACH in a global variable and use that.
Felix