[PATCH 1/6] msi: Make MsiGetLanguage() RPC-compatible.
Zebediah Figura
z.figura12 at gmail.com
Tue Apr 24 22:27:37 CDT 2018
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/msi/install.c | 9 +--------
dlls/msi/package.c | 5 ++---
dlls/msi/tests/custom.c | 8 ++++++--
dlls/msi/winemsi.idl | 2 +-
4 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/dlls/msi/install.c b/dlls/msi/install.c
index 63ffbfe..0ec1f24 100644
--- a/dlls/msi/install.c
+++ b/dlls/msi/install.c
@@ -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 );
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index b1b2cb4..869da8d 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -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)
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index 2f9ba5d..e9561d6 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -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;
diff --git a/dlls/msi/winemsi.idl b/dlls/msi/winemsi.idl
index 132f140..b75f32f 100644
--- a/dlls/msi/winemsi.idl
+++ b/dlls/msi/winemsi.idl
@@ -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 );
--
2.7.4
More information about the wine-devel
mailing list