From d16c7f96c9cbc1da90bc0246321b2de0e0e4b4af Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 31 Jul 2006 21:03:01 +0200 Subject: [PATCH] ntdll: Set initial module refcount to 1 to avoid unloading during imports fixup. --- dlls/ntdll/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 0ca8f2ad86a..d3a3d783149 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -640,7 +640,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename ) wm->ldr.EntryPoint = NULL; wm->ldr.SizeOfImage = nt->OptionalHeader.SizeOfImage; wm->ldr.Flags = LDR_DONT_RESOLVE_REFS; - wm->ldr.LoadCount = 0; + wm->ldr.LoadCount = 1; wm->ldr.TlsIndex = -1; wm->ldr.SectionHandle = NULL; wm->ldr.CheckSum = 0;