On Dec 3, 2007 3:07 AM, Alexandre Julliard julliard@winehq.org wrote:
"Lei Zhang" thestig@google.com writes:
This patch changes how process_detach() works when called with bForceDetach set to TRUE. A module would get detached when that module has no dependencies. After a module gets detached, process_detach() scans through all the modules and update their dependencies. I'm assuming there's no circular dependencies between modules.
You can't assume that, some modules do have circular dependencies. My suspicion is that this bug should be fixed in winmm, but either way you'll need to show some test cases.
-- Alexandre Julliard julliard@winehq.org
Ok, if winmm's DllMain gets called with fdwReason == DLL_PROCESS_DETACH with fImpLoad being non-NULL, then that means we're in the middle of ExitProcess(). In that case, we can simply not call DRIVER_UnloadAll() since the process is about to go away.