Stefan Dösinger wrote:
@@ -851,6 +853,13 @@ DllMain(HINSTANCE hInstDLL,
/* Initialize the ddraw object list critical section unconditionally* Even if the app doesn't use multithreaded ddraw objects it can still* use multiple ddraw objects in multiple threads* Well, initialize it only once*/if(counter == 0) InitializeCriticalSection(&listCrit);
Isn't "counter" redundant? When DllMain is called, the loader lock is held. Furthermore, DllMain( ... DLL_PROCESS_ATTACH) is only called once per process, so counter should only ever be 1 after a DLL_PROCESS_ATTACH and 0 after a DETACH.
Mike