Commit bf558931 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi: Make MsiGetSummaryInformation() RPC-compatible.

parent ed0a8dd3
......@@ -1922,10 +1922,9 @@ UINT __cdecl remote_DatabaseGetPrimaryKeys(MSIHANDLE db, LPCWSTR table, struct w
return r;
}
HRESULT __cdecl remote_DatabaseGetSummaryInformation(MSIHANDLE db, UINT updatecount, MSIHANDLE *suminfo)
UINT __cdecl remote_DatabaseGetSummaryInformation(MSIHANDLE db, UINT updatecount, MSIHANDLE *suminfo)
{
UINT r = MsiGetSummaryInformationW(db, NULL, updatecount, suminfo);
return HRESULT_FROM_WIN32(r);
return MsiGetSummaryInformationW(db, NULL, updatecount, suminfo);
}
UINT __cdecl remote_DatabaseOpenView(MSIHANDLE db, LPCWSTR query, MSIHANDLE *view)
......
......@@ -523,23 +523,16 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE );
if( !db )
{
MSIHANDLE remote;
HRESULT hr;
MSIHANDLE remote, remote_suminfo;
if (!(remote = msi_get_remote(hDatabase)))
return ERROR_INVALID_HANDLE;
hr = remote_DatabaseGetSummaryInformation(remote, uiUpdateCount, pHandle);
ret = remote_DatabaseGetSummaryInformation(remote, uiUpdateCount, &remote_suminfo);
if (!ret)
*pHandle = alloc_msi_remote_handle(remote_suminfo);
if (FAILED(hr))
{
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
return HRESULT_CODE(hr);
return ERROR_FUNCTION_FAILED;
}
return ERROR_SUCCESS;
return ret;
}
}
......
......@@ -243,7 +243,7 @@ static void test_props(MSIHANDLE hinst)
static void test_db(MSIHANDLE hinst)
{
MSIHANDLE hdb, view, rec, rec2;
MSIHANDLE hdb, view, rec, rec2, suminfo;
char buffer[10];
DWORD sz;
UINT r;
......@@ -413,6 +413,15 @@ static void test_db(MSIHANDLE hinst)
r = MsiCloseHandle(rec);
ok(hinst, !r, "got %u\n", r);
r = MsiGetSummaryInformationA(hdb, NULL, 1, NULL);
ok(hinst, r == ERROR_INVALID_PARAMETER, "got %u\n", r);
r = MsiGetSummaryInformationA(hdb, NULL, 1, &suminfo);
ok(hinst, !r, "got %u\n", r);
r = MsiCloseHandle(suminfo);
ok(hinst, !r, "got %u\n", r);
r = MsiCloseHandle(hdb);
ok(hinst, !r, "got %u\n", r);
}
......
......@@ -67,7 +67,7 @@ interface IWineMsiRemote
MSICONDITION remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table );
UINT remote_DatabaseGetPrimaryKeys( [in] MSIHANDLE db, [in, string] LPCWSTR table, [out] struct wire_record **keys );
HRESULT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo );
UINT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo );
UINT remote_DatabaseOpenView( [in] MSIHANDLE db, [in, string] LPCWSTR query, [out] MSIHANDLE *view );
MSIHANDLE remote_GetActiveDatabase( [in] MSIHANDLE hinst );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment