Commit c6741d83 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Handle remote calls to MsiSetInstallLevel.

parent 569ea392
......@@ -1100,9 +1100,30 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel)
TRACE("%ld %i\n", hInstall, iInstallLevel);
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE );
if ( !package )
return ERROR_INVALID_HANDLE;
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package)
{
HRESULT hr;
IWineMsiRemotePackage *remote_package;
remote_package = (IWineMsiRemotePackage *)msi_get_remote(hInstall);
if (!remote_package)
return ERROR_INVALID_HANDLE;
hr = IWineMsiRemotePackage_SetInstallLevel(remote_package, iInstallLevel);
IWineMsiRemotePackage_Release(remote_package);
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 );
......
......@@ -54,6 +54,7 @@ interface IWineMsiRemotePackage : IUnknown
HRESULT GetComponentState( [in] BSTR *component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
HRESULT SetComponentState( [in] BSTR *component, [in] INSTALLSTATE state );
HRESULT GetLanguage( [out] LANGID *language );
HRESULT SetInstallLevel( [in] int level );
}
[
......
......@@ -1655,6 +1655,13 @@ HRESULT WINAPI mrp_GetLanguage( IWineMsiRemotePackage *iface, LANGID *language )
return S_OK;
}
HRESULT WINAPI mrp_SetInstallLevel( IWineMsiRemotePackage *iface, int level )
{
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiSetInstallLevel(This->package, level);
return HRESULT_FROM_WIN32(r);
}
static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
{
mrp_QueryInterface,
......@@ -1676,6 +1683,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
mrp_GetComponentState,
mrp_SetComponentState,
mrp_GetLanguage,
mrp_SetInstallLevel,
};
HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj )
......
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