Commit 2e25b859 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 6a78ea4d
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment