module patch

Ove Kaaven ovehk at ping.uio.no
Sun Apr 15 10:48:17 CDT 2001


The winesetuptk tool's fake-windows installation writes empty fake DLL
files, like:

-rw-rw-r--    1 ovek     ovek            0 Apr  6 16:44 Windows/System/ddraw.dll

If such files exist, the built-in dll's version resources would not be
loaded. The following simple addition to Dmitry's LOAD_LIBRARY_AS_DATAFILE
support for builtin dlls enables the usage of builtin resources in
winesetuptk's fake-windows installation.

Log:
Ove Kaaven <ovek at transgaming.com>
Let LOAD_LIBRARY_AS_DATAFILE load the builtin dll if loading a native DLL
failed, so that winesetuptk's fake-windows installation work.

Index: wine/loader/module.c
diff -u wine/loader/module.c:1.1.1.15 wine/loader/module.c:1.6
--- wine/loader/module.c:1.1.1.15	Sat Apr 14 17:47:54 2001
+++ wine/loader/module.c	Sat Apr  7 08:42:48 2001
@@ -1261,6 +1261,7 @@
             /* This method allows searching for the 'native' libraries only */
             if (!SearchPathA( NULL, libname, ".dll", sizeof(filename), filename, NULL ))
             {
+ data_builtin:
                 flags |= DONT_RESOLVE_DLL_REFERENCES; /* Just in case */
                 goto try_builtin; /* Fallback to normal behaviour */
             }
@@ -1271,6 +1272,7 @@
             {
                 hmod = PE_LoadImage( hFile, filename, flags );
                 CloseHandle( hFile );
+                if (!hmod) goto data_builtin;
             }
             return hmod;
         }





More information about the wine-patches mailing list