Commit 95d057a8 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

msi: Support MSIDBOPEN_CREATEDIRECT and MSIDBOPEN_DIRECT in MSI_OpenDatabaseW.

parent 68e867da
...@@ -93,8 +93,10 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb) ...@@ -93,8 +93,10 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
r = StgOpenStorage( szDBPath, NULL, r = StgOpenStorage( szDBPath, NULL,
STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg); STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg);
} }
else if( szPersist == MSIDBOPEN_CREATE ) else if( szPersist == MSIDBOPEN_CREATE || szPersist == MSIDBOPEN_CREATEDIRECT )
{ {
/* FIXME: MSIDBOPEN_CREATE should case STGM_TRANSACTED flag to be
* used here: */
r = StgCreateDocfile( szDBPath, r = StgCreateDocfile( szDBPath,
STGM_DIRECT|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, 0, &stg); STGM_DIRECT|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, 0, &stg);
if( r == ERROR_SUCCESS ) if( r == ERROR_SUCCESS )
...@@ -105,6 +107,13 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb) ...@@ -105,6 +107,13 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
} }
else if( szPersist == MSIDBOPEN_TRANSACT ) else if( szPersist == MSIDBOPEN_TRANSACT )
{ {
/* FIXME: MSIDBOPEN_TRANSACT should case STGM_TRANSACTED flag to be
* used here: */
r = StgOpenStorage( szDBPath, NULL,
STGM_DIRECT|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, NULL, 0, &stg);
}
else if( szPersist == MSIDBOPEN_DIRECT )
{
r = StgOpenStorage( szDBPath, NULL, r = StgOpenStorage( szDBPath, NULL,
STGM_DIRECT|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); STGM_DIRECT|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, NULL, 0, &stg);
} }
......
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