msi: Parse the MSIDBOPEN_PATCHFILE flag.

oldstable
James Hawkins 2008-07-08 00:05:31 -05:00 committed by Alexandre Julliard
parent ccd030c7d3
commit ca4758201d
2 changed files with 9 additions and 0 deletions

View File

@ -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 ) )

View File

@ -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,