mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[WINESYNC] msi: Make MsiDatabaseIsTablePersistent() RPC-compatible.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 252dd11f20a7ac2285d4f082f3ab3f3168f494dc by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
7cc54a4f48
commit
b4fb978270
5 changed files with 23 additions and 12 deletions
|
@ -2017,10 +2017,9 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle )
|
|||
return ret;
|
||||
}
|
||||
|
||||
HRESULT __cdecl remote_DatabaseIsTablePersistent(MSIHANDLE db, LPCWSTR table, MSICONDITION *persistent)
|
||||
MSICONDITION __cdecl remote_DatabaseIsTablePersistent(MSIHANDLE db, LPCWSTR table)
|
||||
{
|
||||
*persistent = MsiDatabaseIsTablePersistentW(db, table);
|
||||
return S_OK;
|
||||
return MsiDatabaseIsTablePersistentW(db, table);
|
||||
}
|
||||
|
||||
HRESULT __cdecl remote_DatabaseGetPrimaryKeys(MSIHANDLE db, LPCWSTR table, MSIHANDLE *keys)
|
||||
|
|
|
@ -1024,19 +1024,12 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentW(
|
|||
db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE );
|
||||
if( !db )
|
||||
{
|
||||
HRESULT hr;
|
||||
MSICONDITION condition;
|
||||
MSIHANDLE remote;
|
||||
|
||||
if (!(remote = msi_get_remote(hDatabase)))
|
||||
return MSICONDITION_ERROR;
|
||||
|
||||
hr = remote_DatabaseIsTablePersistent(remote, szTableName, &condition);
|
||||
|
||||
if (FAILED(hr))
|
||||
return MSICONDITION_ERROR;
|
||||
|
||||
return condition;
|
||||
return remote_DatabaseIsTablePersistent(remote, szTableName);
|
||||
}
|
||||
|
||||
r = MSI_DatabaseIsTablePersistent( db, szTableName );
|
||||
|
|
|
@ -56,7 +56,7 @@ struct wire_record {
|
|||
]
|
||||
interface IWineMsiRemote
|
||||
{
|
||||
HRESULT remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSICONDITION *persistent );
|
||||
MSICONDITION remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table );
|
||||
HRESULT remote_DatabaseGetPrimaryKeys( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSIHANDLE *keys );
|
||||
HRESULT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo );
|
||||
HRESULT remote_DatabaseOpenView( [in] MSIHANDLE db, [in] LPCWSTR query, [out] MSIHANDLE *view );
|
||||
|
|
|
@ -249,6 +249,9 @@ static void test_db(MSIHANDLE hinst)
|
|||
hdb = MsiGetActiveDatabase(hinst);
|
||||
ok(hinst, hdb, "MsiGetActiveDatabase failed\n");
|
||||
|
||||
r = MsiDatabaseIsTablePersistentA(hdb, "Test");
|
||||
ok(hinst, r == MSICONDITION_TRUE, "got %u\n", r);
|
||||
|
||||
r = MsiCloseHandle(hdb);
|
||||
ok(hinst, !r, "got %u\n", r);
|
||||
}
|
||||
|
|
|
@ -4108,11 +4108,25 @@ static INT CALLBACK ok_callback(void *context, UINT message_type, MSIHANDLE reco
|
|||
|
||||
static void test_customaction1(void)
|
||||
{
|
||||
MSIHANDLE hdb, record;
|
||||
UINT r;
|
||||
|
||||
create_database(msifile, ca1_tables, sizeof(ca1_tables) / sizeof(msi_table));
|
||||
add_custom_dll();
|
||||
|
||||
/* create a test table */
|
||||
MsiOpenDatabaseW(msifileW, MSIDBOPEN_TRANSACT, &hdb);
|
||||
run_query(hdb, 0, "CREATE TABLE `Test` (`Name` CHAR(10), `Number` INTEGER, `Data` OBJECT PRIMARY KEY `Name`)");
|
||||
create_file("unus", 10);
|
||||
create_file("duo", 10);
|
||||
record = MsiCreateRecord(1);
|
||||
MsiRecordSetStreamA(record, 1, "unus");
|
||||
run_query(hdb, record, "INSERT INTO `Test` (`Name`, `Number`, `Data`) VALUES ('one', 1, ?)");
|
||||
MsiRecordSetStreamA(record, 1, "duo");
|
||||
run_query(hdb, record, "INSERT INTO `Test` (`Name`, `Number`, `Data`) VALUES ('two', 2, ?)");
|
||||
MsiDatabaseCommit(hdb);
|
||||
MsiCloseHandle(hdb);
|
||||
|
||||
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
|
||||
|
||||
r = MsiInstallProductA(msifile, "MAIN_TEST=1");
|
||||
|
@ -4136,6 +4150,8 @@ static void test_customaction1(void)
|
|||
ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
|
||||
|
||||
DeleteFileA(msifile);
|
||||
DeleteFileA("unus");
|
||||
DeleteFileA("duo");
|
||||
}
|
||||
|
||||
static void test_customaction51(void)
|
||||
|
|
Loading…
Reference in a new issue