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

This commit is contained in:
Alexandre Julliard 2008-11-10 13:20:45 +01:00
parent 6a78ea4d6c
commit 2e25b859ea
1 changed files with 2 additions and 1 deletions

View File

@ -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)