mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[WINESYNC] msi: Handle the remote case in MsiSummaryInfoGetProperty.
This patch fixes the regression introduced by bf5589311de8ac2c74e3bd73bef32337a2ce8df2. Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id ce2ebd72750ca85e7307372de1a73831ad9e73a8 by Dmitry Timoshkov <dmitry@baikal.ru>
This commit is contained in:
parent
28c46d90e1
commit
0bde253621
3 changed files with 66 additions and 9 deletions
|
@ -756,7 +756,29 @@ UINT WINAPI MsiSummaryInfoGetPropertyA(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO )))
|
if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO )))
|
||||||
return ERROR_INVALID_HANDLE;
|
{
|
||||||
|
MSIHANDLE remote;
|
||||||
|
WCHAR *buf = NULL;
|
||||||
|
|
||||||
|
if (!(remote = msi_get_remote( handle )))
|
||||||
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
__TRY
|
||||||
|
{
|
||||||
|
r = remote_SummaryInfoGetProperty( remote, uiProperty, puiDataType, piValue, pftValue, &buf );
|
||||||
|
}
|
||||||
|
__EXCEPT(rpc_filter)
|
||||||
|
{
|
||||||
|
r = GetExceptionCode();
|
||||||
|
}
|
||||||
|
__ENDTRY
|
||||||
|
|
||||||
|
if (!r)
|
||||||
|
r = msi_strncpyWtoA( buf, -1, szValueBuf, pcchValueBuf, TRUE );
|
||||||
|
|
||||||
|
midl_user_free( buf );
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
str.unicode = FALSE;
|
str.unicode = FALSE;
|
||||||
str.str.a = szValueBuf;
|
str.str.a = szValueBuf;
|
||||||
|
@ -784,7 +806,29 @@ UINT WINAPI MsiSummaryInfoGetPropertyW(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO )))
|
if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO )))
|
||||||
return ERROR_INVALID_HANDLE;
|
{
|
||||||
|
MSIHANDLE remote;
|
||||||
|
WCHAR *buf = NULL;
|
||||||
|
|
||||||
|
if (!(remote = msi_get_remote( handle )))
|
||||||
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
__TRY
|
||||||
|
{
|
||||||
|
r = remote_SummaryInfoGetProperty( remote, uiProperty, puiDataType, piValue, pftValue, &buf );
|
||||||
|
}
|
||||||
|
__EXCEPT(rpc_filter)
|
||||||
|
{
|
||||||
|
r = GetExceptionCode();
|
||||||
|
}
|
||||||
|
__ENDTRY
|
||||||
|
|
||||||
|
if (!r)
|
||||||
|
r = msi_strncpyW( buf, -1, szValueBuf, pcchValueBuf );
|
||||||
|
|
||||||
|
midl_user_free( buf );
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
str.unicode = TRUE;
|
str.unicode = TRUE;
|
||||||
str.str.w = szValueBuf;
|
str.str.w = szValueBuf;
|
||||||
|
@ -1284,3 +1328,21 @@ UINT __cdecl s_remote_SummaryInfoGetPropertyCount( MSIHANDLE suminfo, UINT *coun
|
||||||
{
|
{
|
||||||
return MsiSummaryInfoGetPropertyCount( suminfo, count );
|
return MsiSummaryInfoGetPropertyCount( suminfo, count );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT __cdecl s_remote_SummaryInfoGetProperty( MSIHANDLE suminfo, UINT property, UINT *type,
|
||||||
|
INT *value, FILETIME *ft, LPWSTR *buf )
|
||||||
|
{
|
||||||
|
WCHAR empty[1];
|
||||||
|
DWORD size = 0;
|
||||||
|
UINT r;
|
||||||
|
|
||||||
|
r = MsiSummaryInfoGetPropertyW( suminfo, property, type, value, ft, empty, &size );
|
||||||
|
if (r == ERROR_MORE_DATA)
|
||||||
|
{
|
||||||
|
size++;
|
||||||
|
*buf = midl_user_allocate( size * sizeof(WCHAR) );
|
||||||
|
if (!*buf) return ERROR_OUTOFMEMORY;
|
||||||
|
r = MsiSummaryInfoGetPropertyW( suminfo, property, type, value, ft, *buf, &size );
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
|
@ -75,6 +75,8 @@ interface IWineMsiRemote
|
||||||
UINT remote_DatabaseOpenView( [in] MSIHANDLE db, [in, string] LPCWSTR query, [out] MSIHANDLE *view );
|
UINT remote_DatabaseOpenView( [in] MSIHANDLE db, [in, string] LPCWSTR query, [out] MSIHANDLE *view );
|
||||||
|
|
||||||
UINT remote_SummaryInfoGetPropertyCount( [in] MSIHANDLE suminfo, [out] UINT *count );
|
UINT remote_SummaryInfoGetPropertyCount( [in] MSIHANDLE suminfo, [out] UINT *count );
|
||||||
|
UINT remote_SummaryInfoGetProperty( [in] MSIHANDLE suminfo, [in] UINT property, [out] UINT *type, [out] INT *value,
|
||||||
|
[out] FILETIME *ft, [out, string] LPWSTR *buf );
|
||||||
|
|
||||||
MSIHANDLE remote_GetActiveDatabase( [in] MSIHANDLE hinst );
|
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 );
|
||||||
|
|
|
@ -464,7 +464,6 @@ static void test_db(MSIHANDLE hinst)
|
||||||
ok(hinst, count == 5, "got %u\n", count);
|
ok(hinst, count == 5, "got %u\n", count);
|
||||||
|
|
||||||
r = MsiSummaryInfoGetPropertyA(suminfo, 0, NULL, NULL, NULL, NULL, NULL);
|
r = MsiSummaryInfoGetPropertyA(suminfo, 0, NULL, NULL, NULL, NULL, NULL);
|
||||||
todo_wine
|
|
||||||
ok(hinst, r == RPC_X_NULL_REF_POINTER, "got %u\n", r);
|
ok(hinst, r == RPC_X_NULL_REF_POINTER, "got %u\n", r);
|
||||||
|
|
||||||
type = 0xdeadbeef;
|
type = 0xdeadbeef;
|
||||||
|
@ -472,11 +471,8 @@ todo_wine
|
||||||
strcpy(buffer, "deadbeef");
|
strcpy(buffer, "deadbeef");
|
||||||
sz = sizeof(buffer);
|
sz = sizeof(buffer);
|
||||||
r = MsiSummaryInfoGetPropertyA(suminfo, PID_AUTHOR, &type, &int_value, &ft, buffer, &sz);
|
r = MsiSummaryInfoGetPropertyA(suminfo, PID_AUTHOR, &type, &int_value, &ft, buffer, &sz);
|
||||||
todo_wine
|
|
||||||
ok(hinst, !r, "got %u\n", r);
|
ok(hinst, !r, "got %u\n", r);
|
||||||
todo_wine
|
|
||||||
ok(hinst, type == 0, "got %u\n", type);
|
ok(hinst, type == 0, "got %u\n", type);
|
||||||
todo_wine
|
|
||||||
ok(hinst, int_value == 0, "got %u\n", int_value);
|
ok(hinst, int_value == 0, "got %u\n", int_value);
|
||||||
ok(hinst, sz == sizeof(buffer), "got %u\n", sz);
|
ok(hinst, sz == sizeof(buffer), "got %u\n", sz);
|
||||||
ok(hinst, !lstrcmpA(buffer, "deadbeef"), "got %s\n", buffer);
|
ok(hinst, !lstrcmpA(buffer, "deadbeef"), "got %s\n", buffer);
|
||||||
|
@ -486,11 +482,8 @@ todo_wine
|
||||||
strcpy(buffer, "deadbeef");
|
strcpy(buffer, "deadbeef");
|
||||||
sz = sizeof(buffer);
|
sz = sizeof(buffer);
|
||||||
r = MsiSummaryInfoGetPropertyA(suminfo, PID_CODEPAGE, &type, &int_value, &ft, buffer, &sz);
|
r = MsiSummaryInfoGetPropertyA(suminfo, PID_CODEPAGE, &type, &int_value, &ft, buffer, &sz);
|
||||||
todo_wine
|
|
||||||
ok(hinst, !r, "got %u\n", r);
|
ok(hinst, !r, "got %u\n", r);
|
||||||
todo_wine
|
|
||||||
ok(hinst, type == 0, "got %u\n", type);
|
ok(hinst, type == 0, "got %u\n", type);
|
||||||
todo_wine
|
|
||||||
ok(hinst, int_value == 0, "got %u\n", int_value);
|
ok(hinst, int_value == 0, "got %u\n", int_value);
|
||||||
ok(hinst, sz == sizeof(buffer), "got %u\n", sz);
|
ok(hinst, sz == sizeof(buffer), "got %u\n", sz);
|
||||||
ok(hinst, !lstrcmpA(buffer, "deadbeef"), "got %s\n", buffer);
|
ok(hinst, !lstrcmpA(buffer, "deadbeef"), "got %s\n", buffer);
|
||||||
|
|
Loading…
Reference in a new issue