Commit 5ab576b8 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi: Make MsiSetInstallLevel() RPC-compatible.

parent 5f45959a
...@@ -1428,22 +1428,11 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel) ...@@ -1428,22 +1428,11 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel)
if (!package) if (!package)
{ {
MSIHANDLE remote; MSIHANDLE remote;
HRESULT hr;
if (!(remote = msi_get_remote(hInstall))) if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
hr = remote_SetInstallLevel(remote, iInstallLevel); return remote_SetInstallLevel(remote, iInstallLevel);
if (FAILED(hr))
{
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
return HRESULT_CODE(hr);
return ERROR_FUNCTION_FAILED;
}
return ERROR_SUCCESS;
} }
r = MSI_SetInstallLevel( package, iInstallLevel ); r = MSI_SetInstallLevel( package, iInstallLevel );
......
...@@ -2550,10 +2550,9 @@ LANGID __cdecl remote_GetLanguage(MSIHANDLE hinst) ...@@ -2550,10 +2550,9 @@ LANGID __cdecl remote_GetLanguage(MSIHANDLE hinst)
return MsiGetLanguage(hinst); return MsiGetLanguage(hinst);
} }
HRESULT __cdecl remote_SetInstallLevel(MSIHANDLE hinst, int level) UINT __cdecl remote_SetInstallLevel(MSIHANDLE hinst, int level)
{ {
UINT r = MsiSetInstallLevel(hinst, level); return MsiSetInstallLevel(hinst, level);
return HRESULT_FROM_WIN32(r);
} }
HRESULT __cdecl remote_FormatRecord(MSIHANDLE hinst, MSIHANDLE record, HRESULT __cdecl remote_FormatRecord(MSIHANDLE hinst, MSIHANDLE record,
......
...@@ -652,6 +652,12 @@ static void test_misc(MSIHANDLE hinst) ...@@ -652,6 +652,12 @@ static void test_misc(MSIHANDLE hinst)
lang = MsiGetLanguage(hinst); lang = MsiGetLanguage(hinst);
ok(hinst, lang == 1033, "got %u\n", lang); ok(hinst, lang == 1033, "got %u\n", lang);
check_prop(hinst, "INSTALLLEVEL", "3");
r = MsiSetInstallLevel(hinst, 123);
ok(hinst, !r, "got %u\n", r);
check_prop(hinst, "INSTALLLEVEL", "123");
MsiSetInstallLevel(hinst, 3);
} }
static void test_feature_states(MSIHANDLE hinst) static void test_feature_states(MSIHANDLE hinst)
......
...@@ -86,7 +86,7 @@ interface IWineMsiRemote ...@@ -86,7 +86,7 @@ interface IWineMsiRemote
UINT remote_GetComponentState( [in] MSIHANDLE hinst, [in, string] LPCWSTR component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action ); 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 ); UINT remote_SetComponentState( [in] MSIHANDLE hinst, [in, string] LPCWSTR component, [in] INSTALLSTATE state );
LANGID remote_GetLanguage( [in] MSIHANDLE hinst ); LANGID remote_GetLanguage( [in] MSIHANDLE hinst );
HRESULT remote_SetInstallLevel( [in] MSIHANDLE hinst, [in] int level ); UINT remote_SetInstallLevel( [in] MSIHANDLE hinst, [in] int level );
HRESULT remote_FormatRecord( [in] MSIHANDLE hinst, [in] MSIHANDLE record, [out] BSTR *value ); HRESULT remote_FormatRecord( [in] MSIHANDLE hinst, [in] MSIHANDLE record, [out] BSTR *value );
HRESULT remote_EvaluateCondition( [in] MSIHANDLE hinst, [in] BSTR condition ); HRESULT remote_EvaluateCondition( [in] MSIHANDLE hinst, [in] BSTR condition );
HRESULT remote_GetFeatureCost( [in] MSIHANDLE hinst, [in] BSTR feature, [in] INT cost_tree, [in] INSTALLSTATE state, [out] INT *cost ); HRESULT remote_GetFeatureCost( [in] MSIHANDLE hinst, [in] BSTR feature, [in] INT cost_tree, [in] INSTALLSTATE state, [out] INT *cost );
......
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