[PATCH 1/5] kernel32: Allow GetBinaryType() to succeed on Unix binaries.

Zebediah Figura z.figura12 at gmail.com
Tue Apr 10 10:41:04 CDT 2018


This is necessary for services.exe to correctly start the driver,
and seems desirable given the function's other uses.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/kernel32/module.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index 3410d2e..e1255c5 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -610,6 +610,8 @@ BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType )
         break;
     }
     case BINARY_PE:
+    case BINARY_UNIX_EXE:
+    case BINARY_UNIX_LIB:
         *lpBinaryType = (binary_info.flags & BINARY_FLAG_64BIT) ? SCS_64BIT_BINARY : SCS_32BIT_BINARY;
         ret = TRUE;
         break;
@@ -625,10 +627,6 @@ BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType )
         *lpBinaryType = SCS_DOS_BINARY;
         ret = TRUE;
         break;
-    case BINARY_UNIX_EXE:
-    case BINARY_UNIX_LIB:
-        ret = FALSE;
-        break;
     }
 
     CloseHandle( hfile );
-- 
2.7.4




More information about the wine-devel mailing list