"Maarten Lankhorst" M.B.Lankhorst@gmail.com wrote:
+static HINSTANCE ghInst = NULL;
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{
- TRACE("(0x%p, %ld, %p)\n", hinstDLL, fdwReason, lpvReserved);
- switch (fdwReason) {
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
ghInst = NULL;
break;
You meant to make it 'ghInst = hinstDLL;', right? I'd suggest to get rid of ghInst altogether until there is a real need for it.
case DLL_PROCESS_ATTACH:
ghInst = NULL;
break;
You meant to make it 'ghInst = hinstDLL;', right? I'd suggest to get rid of ghInst altogether until there is a real need for it.
And please add a DisableThreadLibraryCalls( hinstDLL ); call.
2006/6/28, Dmitry Timoshkov dmitry@baikal.ru:
"Maarten Lankhorst" M.B.Lankhorst@gmail.com wrote:
+static HINSTANCE ghInst = NULL;
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{
- TRACE("(0x%p, %ld, %p)\n", hinstDLL, fdwReason, lpvReserved);
- switch (fdwReason) {
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
ghInst = NULL;
break;
You meant to make it 'ghInst = hinstDLL;', right? I'd suggest to get rid of ghInst altogether until there is a real need for it.
-- Dmitry.
Thanks, I'll submit the improved version, never knew what DisableThreadLibraryCalls were for, so I looked it up, looks like it's useful.
Maarten