msi: Parse the MSIDBOPEN_PATCHFILE flag.
This commit is contained in:
parent
ccd030c7d3
commit
ca4758201d
|
@ -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 ) )
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue