Mike McCormack : msi: Add an implementation of MsiGetDatabaseState.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jan 30 08:04:10 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 43b27144f06a739dde09d565bd0c6f80eed940d9
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=43b27144f06a739dde09d565bd0c6f80eed940d9
Author: Mike McCormack <mike at codeweavers.com>
Date: Mon Jan 30 14:56:52 2006 +0100
msi: Add an implementation of MsiGetDatabaseState.
---
dlls/msi/database.c | 17 +++++++++++++++++
dlls/msi/msi.spec | 2 +-
include/msiquery.h | 9 +++++++++
3 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index 4da5338..9d3f7d6 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -344,3 +344,20 @@ end:
return r;
}
+
+MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle )
+{
+ MSIDBSTATE ret = MSIDBSTATE_READ;
+ MSIDATABASE *db;
+
+ TRACE("%ld\n", handle);
+
+ db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE );
+ if (!db)
+ return MSIDBSTATE_ERROR;
+ if (db->mode != MSIDBOPEN_READONLY )
+ ret = MSIDBSTATE_WRITE;
+ msiobj_release( &db->hdr );
+
+ return ret;
+}
diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec
index 802adef..7c0ea81 100644
--- a/dlls/msi/msi.spec
+++ b/dlls/msi/msi.spec
@@ -45,7 +45,7 @@
49 stdcall MsiGetActiveDatabase(long)
50 stdcall MsiGetComponentStateA(long str ptr ptr)
51 stdcall MsiGetComponentStateW(long wstr ptr ptr)
-52 stub MsiGetDatabaseState
+52 stdcall MsiGetDatabaseState(long)
53 stub MsiGetFeatureCostA
54 stub MsiGetFeatureCostW
55 stub MsiGetFeatureInfoA
diff --git a/include/msiquery.h b/include/msiquery.h
index 09e5c16..c85ca1c 100644
--- a/include/msiquery.h
+++ b/include/msiquery.h
@@ -127,6 +127,13 @@ typedef enum tagMSIDBERROR
MSIDBERROR_BADLOCALIZEATTRIB = 29
} MSIDBERROR;
+typedef enum tagMSIDBSTATE
+{
+ MSIDBSTATE_ERROR = -1,
+ MSIDBSTATE_READ = 0,
+ MSIDBSTATE_WRITE = 1
+} MSIDBSTATE;
+
/* view manipulation */
UINT WINAPI MsiViewFetch(MSIHANDLE,MSIHANDLE*);
UINT WINAPI MsiViewExecute(MSIHANDLE,MSIHANDLE);
@@ -138,6 +145,8 @@ MSIDBERROR WINAPI MsiViewGetErrorA(MSIHA
MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE,LPWSTR,DWORD*);
#define MsiViewGetError WINELIB_NAME_AW(MsiViewGetError)
+MSIDBSTATE WINAPI MsiGetDatabaseState(MSIHANDLE);
+
/* record manipulation */
MSIHANDLE WINAPI MsiCreateRecord(unsigned int);
UINT WINAPI MsiRecordClearData(MSIHANDLE);
More information about the wine-cvs
mailing list