Module: wine Branch: refs/heads/master Commit: 45a4e5439b648b1b0620acd11f0a7926d9eaad61 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=45a4e5439b648b1b0620acd1...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jan 4 14:55:33 2006 +0100
Set refcount to -1 on implicitly loaded dlls to avoid unloading them (suggested by Michael Ost).
---
dlls/ntdll/loader.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 58da86f..47cc1da 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -934,6 +934,7 @@ static void attach_implicitly_loaded_dll 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 */ }