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

(suggested by Michael Ost).
This commit is contained in:
Alexandre Julliard 2006-01-04 14:55:33 +01:00
parent 64869596cf
commit 45a4e5439b
1 changed files with 1 additions and 0 deletions

View File

@ -934,6 +934,7 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved )
if (mod->Flags & (LDR_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue;
TRACE( "found implicitly loaded %s, attaching to it\n",
debugstr_w(mod->BaseDllName.Buffer));
mod->LoadCount = -1; /* we can't unload it anyway */
process_attach( CONTAINING_RECORD(mod, WINE_MODREF, ldr), reserved );
break; /* restart the search from the start */
}