MsiOpenDatabase's szPersist parameter may be a string or a bitmask

Mike McCormack mike at codeweavers.com
Tue Nov 4 03:26:45 CST 2003


ChangeLog:
* MsiOpenDatabase's szPersist parameter may be a string or a bitmask
-------------- next part --------------
Index: dlls/msi/msi.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/msi.c,v
retrieving revision 1.6
diff -u -r1.6 msi.c
--- dlls/msi/msi.c	30 Oct 2003 22:47:42 -0000	1.6
+++ dlls/msi/msi.c	4 Nov 2003 09:21:31 -0000
@@ -149,7 +149,7 @@
         MultiByteToWideChar( CP_ACP, 0, szDBPath, -1, szwDBPath, len );
     }
 
-    if( szPersist )
+    if( HIWORD(szPersist) )
     {
         len = MultiByteToWideChar( CP_ACP, 0, szPersist, -1, NULL, 0 );
         szwPersist = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
@@ -157,6 +157,8 @@
             goto end;
         MultiByteToWideChar( CP_ACP, 0, szPersist, -1, szwPersist, len );
     }
+    else
+        szwPersist = (LPWSTR) szPersist;
 
     r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB );
 


More information about the wine-patches mailing list