msi: Add an implementation of MsiGetDatabaseState.

oldstable
Mike McCormack 2006-01-30 14:56:52 +01:00 committed by Alexandre Julliard
parent ecc9849974
commit 43b27144f0
3 changed files with 27 additions and 1 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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(MSIHANDLE,LPSTR,DWORD*);
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);