Martin Payne : krnl386.exe16: Shared libraries have a ".exe" rather than " .dll" extension on Windows < 3.0.

Alexandre Julliard julliard at winehq.org
Sun Mar 18 09:02:33 CDT 2018


Module: wine
Branch: oldstable
Commit: 785222246adaf13a98465a00d8cb9e78bb711ba6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=785222246adaf13a98465a00d8cb9e78bb711ba6

Author: Martin Payne <development at martinpayne.me.uk>
Date:   Wed Dec 13 10:23:08 2017 +0000

krnl386.exe16: Shared libraries have a ".exe" rather than ".dll" extension on Windows < 3.0.

Signed-off-by: Martin Payne <development at martinpayne.me.uk>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 4a8834f6ce6ac183faf773c968ad4359cc9fd02e)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/krnl386.exe16/ne_module.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c
index 70f8a46..14f8075 100644
--- a/dlls/krnl386.exe16/ne_module.c
+++ b/dlls/krnl386.exe16/ne_module.c
@@ -788,9 +788,9 @@ static BOOL NE_LoadDLLs( NE_MODULE *pModule )
             /* its handle in the list of DLLs to initialize.   */
             HMODULE16 hDLL;
 
-            /* Append .DLL to name if no extension present */
+            /* Append .DLL (Windows >= 3.00) or .EXE (Windows < 3.00) to name if no extension present */
             if (!(p = strrchr( buffer, '.')) || strchr( p, '/' ) || strchr( p, '\\'))
-                    strcat( buffer, ".DLL" );
+                    strcat( buffer, (GetExeVersion16() >= 0x0300) ? ".DLL" : ".EXE" );
 
             if ((hDLL = MODULE_LoadModule16( buffer, TRUE, TRUE )) < 32)
             {
@@ -988,7 +988,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
 
         strcpy( dllname, basename );
         q = strrchr( dllname, '.' );
-        if (!q) strcat( dllname, ".dll" );
+        if (!q) strcat( dllname, (GetExeVersion16() >= 0x0300) ? ".dll" : ".exe" );
         for (q = dllname; *q; q++) if (*q >= 'A' && *q <= 'Z') *q += 32;
 
         strcpy( q, "16" );




More information about the wine-cvs mailing list