Alexandre Julliard : kernel32: Return the dll flag in MODULE_GetBinaryType for 16-bit modules too.

Alexandre Julliard julliard at winehq.org
Wed Aug 12 11:09:59 CDT 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Aug 12 15:43:35 2009 +0200

kernel32: Return the dll flag in MODULE_GetBinaryType for 16-bit modules too.

---

 dlls/kernel32/module.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index 02cfc2c..4d0a810 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -325,15 +325,16 @@ DWORD MODULE_GetBinaryType( HANDLE hfile, void **res_start, void **res_end )
              */
             if (len >= sizeof(ext_header.os2))
             {
+                DWORD flags = (ext_header.os2.ne_flags & NE_FFLAGS_LIBMODULE) ? BINARY_FLAG_DLL : 0;
                 switch ( ext_header.os2.ne_exetyp )
                 {
-                case 1:  return BINARY_OS216; /* OS/2 */
-                case 2:  return BINARY_WIN16; /* Windows */
-                case 3:  return BINARY_DOS; /* European MS-DOS 4.x */
-                case 4:  return BINARY_WIN16; /* Windows 386; FIXME: is this 32bit??? */
-                case 5:  return BINARY_DOS; /* BOSS, Borland Operating System Services */
+                case 1:  return flags | BINARY_OS216; /* OS/2 */
+                case 2:  return flags | BINARY_WIN16; /* Windows */
+                case 3:  return flags | BINARY_DOS; /* European MS-DOS 4.x */
+                case 4:  return flags | BINARY_WIN16; /* Windows 386; FIXME: is this 32bit??? */
+                case 5:  return flags | BINARY_DOS; /* BOSS, Borland Operating System Services */
                 /* other types, e.g. 0 is: "unknown" */
-                default: return MODULE_Decide_OS2_OldWin(hfile, &header.mz, &ext_header.os2);
+                default: return flags | MODULE_Decide_OS2_OldWin(hfile, &header.mz, &ext_header.os2);
                 }
             }
             /* Couldn't read header, so abort. */




More information about the wine-cvs mailing list