Allow MsiOpenPackage to handle #nnn packages

Aric Stewart aric at codeweavers.com
Wed Jul 14 09:02:36 CDT 2004


implement the functionality that allows one to call MsiOpenPackage with 
#nnn where nnn is a string representing the handle to an open database

-aric
-------------- next part --------------
Index: dlls/msi/package.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/package.c,v
retrieving revision 1.14
diff -u -w -r1.14 package.c
--- dlls/msi/package.c	9 Jul 2004 22:58:27 -0000	1.14
+++ dlls/msi/package.c	14 Jul 2004 14:00:48 -0000
@@ -378,9 +378,17 @@
 
     TRACE("%s %p\n",debugstr_w(szPackage), pPackage);
 
+    if (szPackage[0] == '#')
+    {
+        INT handle = atoiW(&szPackage[1]);
+        db = msihandle2msiinfo( handle , MSIHANDLETYPE_DATABASE);
+    }
+    else
+    {
     rc = MSI_OpenDatabaseW(szPackage, MSIDBOPEN_READONLY, &db);
     if (rc != ERROR_SUCCESS)
         return ERROR_FUNCTION_FAILED;
+    }
 
     package = alloc_msiobject( MSIHANDLETYPE_PACKAGE, sizeof (MSIPACKAGE),
                                MSI_FreePackage );


More information about the wine-patches mailing list