Robert Shearman : msi:
Support MSIDBOPEN_CREATEDIRECT and MSIDBOPEN_DIRECT in
MSI_OpenDatabaseW.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 9 16:18:54 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 95d057a8390d54c3a8385f211f11e530ab173c75
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=95d057a8390d54c3a8385f211f11e530ab173c75
Author: Robert Shearman <rob at codeweavers.com>
Date: Wed Aug 9 18:16:27 2006 +0100
msi: Support MSIDBOPEN_CREATEDIRECT and MSIDBOPEN_DIRECT in MSI_OpenDatabaseW.
---
dlls/msi/database.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index 5ac7f48..0dc3f85 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -93,8 +93,10 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath,
r = StgOpenStorage( szDBPath, NULL,
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,
STGM_DIRECT|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, 0, &stg);
if( r == ERROR_SUCCESS )
@@ -105,6 +107,13 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath,
}
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,
STGM_DIRECT|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, NULL, 0, &stg);
}
More information about the wine-cvs
mailing list