James Hawkins : msi: Parse the MSIDBOPEN_PATCHFILE flag.
Alexandre Julliard
julliard at winehq.org
Tue Jul 8 06:11:09 CDT 2008
Module: wine
Branch: master
Commit: ca4758201d94655765d2c92cec59dfcbee2cbf8e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ca4758201d94655765d2c92cec59dfcbee2cbf8e
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Tue Jul 8 00:05:31 2008 -0500
msi: Parse the MSIDBOPEN_PATCHFILE flag.
---
dlls/msi/database.c | 7 +++++++
include/msiquery.h | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index eaf8ebd..2900860 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -90,6 +90,13 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
if( !pdb )
return ERROR_INVALID_PARAMETER;
+ if (szPersist - MSIDBOPEN_PATCHFILE >= MSIDBOPEN_READONLY &&
+ szPersist - MSIDBOPEN_PATCHFILE <= MSIDBOPEN_CREATEDIRECT)
+ {
+ TRACE("Database is a patch\n");
+ szPersist -= MSIDBOPEN_PATCHFILE;
+ }
+
save_path = szDBPath;
szMode = szPersist;
if( HIWORD( szPersist ) )
diff --git a/include/msiquery.h b/include/msiquery.h
index 1358033..fa42f17 100644
--- a/include/msiquery.h
+++ b/include/msiquery.h
@@ -75,6 +75,8 @@ typedef enum tagMSIMODIFY
#define MSIDBOPEN_CREATEDIRECT (LPCWSTR)4
#endif
+#define MSIDBOPEN_PATCHFILE 32 / sizeof(*MSIDBOPEN_READONLY)
+
typedef enum tagMSIRUNMODE
{
MSIRUNMODE_ADMIN = 0,
More information about the wine-cvs
mailing list