Commit ca475820 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Parse the MSIDBOPEN_PATCHFILE flag.

parent ccd030c7
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment