From 8cd569cf2628fbb2497e5ef020e670f77cf36d40 Mon Sep 17 00:00:00 2001 From: Brendan McGrath Date: Sun, 25 Nov 2018 06:39:00 +1100 Subject: [PATCH] ntdll: Use 32bit when COM header marks it required. Currently, when using wine64 to to load a .NET application which has the 32-bit required flag switched on, it fails with a c0000017 error (ERROR_NOT_ENOUGH_MEMORY). Signed-off-by: Brendan McGrath Signed-off-by: Alexandre Julliard --- dlls/ntdll/loader.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index b00a5f889fd..631e8bd9985 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1984,12 +1984,8 @@ static BOOL is_valid_binary( HMODULE module, const pe_image_info_t *info ) if (info->machine == IMAGE_FILE_MACHINE_ARM64) return TRUE; #endif if (!info->contains_code) return TRUE; - if (info->image_flags & IMAGE_FLAGS_ComPlusNativeReady) - { - if (!convert_to_pe64( module, info )) return FALSE; - } - if (info->image_flags & IMAGE_FLAGS_ComPlusILOnly) return TRUE; - return FALSE; + if (!(info->image_flags & IMAGE_FLAGS_ComPlusNativeReady)) return FALSE; + return convert_to_pe64( module, info ); #else return FALSE; /* no wow64 support on other platforms */ #endif