Set refcount to -1 on implicitly loaded dlls to avoid unloading them
(suggested by Michael Ost).
This commit is contained in:
parent
64869596cf
commit
45a4e5439b
|
@ -934,6 +934,7 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved )
|
||||||
if (mod->Flags & (LDR_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue;
|
if (mod->Flags & (LDR_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue;
|
||||||
TRACE( "found implicitly loaded %s, attaching to it\n",
|
TRACE( "found implicitly loaded %s, attaching to it\n",
|
||||||
debugstr_w(mod->BaseDllName.Buffer));
|
debugstr_w(mod->BaseDllName.Buffer));
|
||||||
|
mod->LoadCount = -1; /* we can't unload it anyway */
|
||||||
process_attach( CONTAINING_RECORD(mod, WINE_MODREF, ldr), reserved );
|
process_attach( CONTAINING_RECORD(mod, WINE_MODREF, ldr), reserved );
|
||||||
break; /* restart the search from the start */
|
break; /* restart the search from the start */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue