From 2e25b859eaa0d9b479f8a51327ae6bdd0e327f87 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 10 Nov 2008 13:20:45 +0100 Subject: [PATCH] ntdll: Don't call the dll entry point for native modules. --- dlls/ntdll/loader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 84dd18fd636..eab7516de25 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -715,7 +715,8 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename ) else p = wm->ldr.FullDllName.Buffer; RtlInitUnicodeString( &wm->ldr.BaseDllName, p ); - if (nt->FileHeader.Characteristics & IMAGE_FILE_DLL) + if (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_NATIVE && + (nt->FileHeader.Characteristics & IMAGE_FILE_DLL)) { wm->ldr.Flags |= LDR_IMAGE_IS_DLL; if (nt->OptionalHeader.AddressOfEntryPoint)