ntdll: detach modules based on inter-module dependencies (try 2)

Lei Zhang thestig at google.com
Tue Dec 4 00:06:23 CST 2007


On Dec 3, 2007 3:07 AM, Alexandre Julliard <julliard at winehq.org> wrote:
> "Lei Zhang" <thestig at 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 at 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.



More information about the wine-devel mailing list