[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    Re: (wine-devel) Problems with GetFileVersionInfo[Size]()
From:       Malte.Starostik () t-online ! de (Malte Starostik)
Date:       2001-06-15 5:41:37
[Download RAW message or body]

On Dienstag, 12. Juni 2001 04:20, you wrote:

> Hi,
>
> The Shockwave ActiveX control I'm loading tries to read the VERSIONINFO
> resource from my winelib app. AFAICS it subsequently crashes because that
> fails.
Basically the problem is that MODULE_FindModule() appends .DLL if there is no 
extension, which is wrong in case of the passed filename being an 
extension-less winelib app. This patch fixes that, might not be the cleanest 
approach though. Just an idea for the enlightened :)
-Malte
-- 
Wars don't determine who's right, only who's left.
["loader.diff" (text/x-c)]

Index: module.c
===================================================================
RCS file: /home/wine/wine/loader/module.c,v
retrieving revision 1.129
diff -u -3 -d -p -r1.129 module.c
--- module.c	2001/06/06 20:24:12	1.129
+++ module.c	2001/06/15 05:28:18
@@ -449,6 +449,16 @@ WINE_MODREF *MODULE_FindModule(
     WINE_MODREF	*wm;
     char dllname[260], *p;
 
+    /* Check if path is the main exe module */
+    if ( exe_modref )
+    {
+        if ( !FILE_strcasecmp( path, exe_modref->modname ) ||
+            !FILE_strcasecmp( path, exe_modref->filename ) ||
+            !FILE_strcasecmp( path, exe_modref->short_modname ) ||
+            !FILE_strcasecmp( path, exe_modref->short_filename ) )
+            return exe_modref;
+    }
+
     /* Append .DLL to name if no extension present */
     strcpy( dllname, path );
     if (!(p = strrchr( dllname, '.')) || strchr( p, '/' ) || strchr( p, '\\'))


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic