msi: Make MsiGetLanguage() 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>
This commit is contained in:
Zebediah Figura 2018-04-24 22:27:37 -05:00 committed by Alexandre Julliard
parent c65df521a4
commit 5f45959adc
4 changed files with 10 additions and 14 deletions

View File

@ -1379,18 +1379,11 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
if (!package)
{
MSIHANDLE remote;
HRESULT hr;
LANGID lang;
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
hr = remote_GetLanguage(remote, &lang);
if (SUCCEEDED(hr))
return lang;
return 0;
return remote_GetLanguage(remote);
}
langid = msi_get_property_int( package->db, szProductLanguage, 0 );

View File

@ -2545,10 +2545,9 @@ UINT __cdecl remote_SetComponentState(MSIHANDLE hinst, LPCWSTR component, INSTAL
return MsiSetComponentStateW(hinst, component, state);
}
HRESULT __cdecl remote_GetLanguage(MSIHANDLE hinst, LANGID *language)
LANGID __cdecl remote_GetLanguage(MSIHANDLE hinst)
{
*language = MsiGetLanguage(hinst);
return S_OK;
return MsiGetLanguage(hinst);
}
HRESULT __cdecl remote_SetInstallLevel(MSIHANDLE hinst, int level)

View File

@ -642,12 +642,16 @@ static void test_targetpath(MSIHANDLE hinst)
ok(hinst, sz == srcsz, "got size %u\n", sz);
}
static void test_mode(MSIHANDLE hinst)
static void test_misc(MSIHANDLE hinst)
{
LANGID lang;
UINT r;
r = MsiSetMode(hinst, MSIRUNMODE_REBOOTATEND, FALSE);
ok(hinst, !r, "got %u\n", r);
lang = MsiGetLanguage(hinst);
ok(hinst, lang == 1033, "got %u\n", lang);
}
static void test_feature_states(MSIHANDLE hinst)
@ -767,7 +771,7 @@ UINT WINAPI main_test(MSIHANDLE hinst)
test_db(hinst);
test_doaction(hinst);
test_targetpath(hinst);
test_mode(hinst);
test_misc(hinst);
test_feature_states(hinst);
return ERROR_SUCCESS;

View File

@ -85,7 +85,7 @@ interface IWineMsiRemote
UINT remote_SetFeatureState( [in] MSIHANDLE hinst, [in, string] LPCWSTR feature, [in] INSTALLSTATE state );
UINT remote_GetComponentState( [in] MSIHANDLE hinst, [in, string] LPCWSTR component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
UINT remote_SetComponentState( [in] MSIHANDLE hinst, [in, string] LPCWSTR component, [in] INSTALLSTATE state );
HRESULT remote_GetLanguage( [in] MSIHANDLE hinst, [out] LANGID *language );
LANGID remote_GetLanguage( [in] MSIHANDLE hinst );
HRESULT remote_SetInstallLevel( [in] MSIHANDLE hinst, [in] int level );
HRESULT remote_FormatRecord( [in] MSIHANDLE hinst, [in] MSIHANDLE record, [out] BSTR *value );
HRESULT remote_EvaluateCondition( [in] MSIHANDLE hinst, [in] BSTR condition );