mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[WINESYNC] msi: Make MsiGetActiveDatabase() 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 a6934768d1070d91c764d5c88fe276a9d6163683 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
cd631b7912
commit
7cc54a4f48
3 changed files with 18 additions and 6 deletions
|
@ -1693,7 +1693,8 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall)
|
||||||
}
|
}
|
||||||
else if ((remote = msi_get_remote(hInstall)))
|
else if ((remote = msi_get_remote(hInstall)))
|
||||||
{
|
{
|
||||||
remote_GetActiveDatabase(remote, &handle);
|
handle = remote_GetActiveDatabase(remote);
|
||||||
|
handle = alloc_msi_remote_handle(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return handle;
|
return handle;
|
||||||
|
@ -2427,11 +2428,9 @@ UINT WINAPI MsiGetPropertyW( MSIHANDLE hInstall, LPCWSTR szName,
|
||||||
return MSI_GetProperty( hInstall, szName, &val, pchValueBuf );
|
return MSI_GetProperty( hInstall, szName, &val, pchValueBuf );
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT __cdecl remote_GetActiveDatabase(MSIHANDLE hinst, MSIHANDLE *handle)
|
MSIHANDLE __cdecl remote_GetActiveDatabase(MSIHANDLE hinst)
|
||||||
{
|
{
|
||||||
*handle = MsiGetActiveDatabase(hinst);
|
return MsiGetActiveDatabase(hinst);
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT __cdecl remote_GetProperty(MSIHANDLE hinst, LPCWSTR property, LPWSTR *value, DWORD *size)
|
UINT __cdecl remote_GetProperty(MSIHANDLE hinst, LPCWSTR property, LPWSTR *value, DWORD *size)
|
||||||
|
|
|
@ -61,7 +61,7 @@ interface IWineMsiRemote
|
||||||
HRESULT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo );
|
HRESULT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo );
|
||||||
HRESULT remote_DatabaseOpenView( [in] MSIHANDLE db, [in] LPCWSTR query, [out] MSIHANDLE *view );
|
HRESULT remote_DatabaseOpenView( [in] MSIHANDLE db, [in] LPCWSTR query, [out] MSIHANDLE *view );
|
||||||
|
|
||||||
HRESULT remote_GetActiveDatabase( [in] MSIHANDLE hinst, [out] MSIHANDLE *handle );
|
MSIHANDLE remote_GetActiveDatabase( [in] MSIHANDLE hinst );
|
||||||
UINT remote_GetProperty( [in] MSIHANDLE hinst, [in, string] LPCWSTR property, [out, string] LPWSTR *value, [out] DWORD *size );
|
UINT remote_GetProperty( [in] MSIHANDLE hinst, [in, string] LPCWSTR property, [out, string] LPWSTR *value, [out] DWORD *size );
|
||||||
UINT remote_SetProperty( [in] MSIHANDLE hinst, [in, string, unique] LPCWSTR property, [in, string, unique] LPCWSTR value );
|
UINT remote_SetProperty( [in] MSIHANDLE hinst, [in, string, unique] LPCWSTR property, [in, string, unique] LPCWSTR value );
|
||||||
int remote_ProcessMessage( [in] MSIHANDLE hinst, [in] INSTALLMESSAGE message, [in] struct wire_record *record );
|
int remote_ProcessMessage( [in] MSIHANDLE hinst, [in] INSTALLMESSAGE message, [in] struct wire_record *record );
|
||||||
|
|
|
@ -241,6 +241,18 @@ static void test_props(MSIHANDLE hinst)
|
||||||
ok(hinst, !memcmp(buffer, "a\0\0\0\xcc", 5), "wrong data\n");
|
ok(hinst, !memcmp(buffer, "a\0\0\0\xcc", 5), "wrong data\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_db(MSIHANDLE hinst)
|
||||||
|
{
|
||||||
|
MSIHANDLE hdb;
|
||||||
|
UINT r;
|
||||||
|
|
||||||
|
hdb = MsiGetActiveDatabase(hinst);
|
||||||
|
ok(hinst, hdb, "MsiGetActiveDatabase failed\n");
|
||||||
|
|
||||||
|
r = MsiCloseHandle(hdb);
|
||||||
|
ok(hinst, !r, "got %u\n", r);
|
||||||
|
}
|
||||||
|
|
||||||
/* Main test. Anything that doesn't depend on a specific install configuration
|
/* Main test. Anything that doesn't depend on a specific install configuration
|
||||||
* or have undesired side effects should go here. */
|
* or have undesired side effects should go here. */
|
||||||
UINT WINAPI main_test(MSIHANDLE hinst)
|
UINT WINAPI main_test(MSIHANDLE hinst)
|
||||||
|
@ -265,6 +277,7 @@ UINT WINAPI main_test(MSIHANDLE hinst)
|
||||||
todo_wine_ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res);
|
todo_wine_ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res);
|
||||||
|
|
||||||
test_props(hinst);
|
test_props(hinst);
|
||||||
|
test_db(hinst);
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue