Commit 45a4e543 authored by Alexandre Julliard's avatar Alexandre Julliard

Set refcount to -1 on implicitly loaded dlls to avoid unloading them

(suggested by Michael Ost).
parent 64869596
...@@ -934,6 +934,7 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved ) ...@@ -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 */
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment