Alexandre Julliard : ntdll: Don' t call the dll entry point for native modules.

Alexandre Julliard julliard at winehq.org
Mon Nov 10 07:44:05 CST 2008


Module: wine
Branch: master
Commit: 2e25b859eaa0d9b479f8a51327ae6bdd0e327f87
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2e25b859eaa0d9b479f8a51327ae6bdd0e327f87

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Nov 10 13:20:45 2008 +0100

ntdll: Don't call the dll entry point for native modules.

---

 dlls/ntdll/loader.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 84dd18f..eab7516 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)




More information about the wine-cvs mailing list