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

msi: Handle remote calls to MsiProcessMessage.

parent d7d40b7d
......@@ -25,6 +25,7 @@ import "oaidl.idl";
cpp_quote("#if 0")
typedef unsigned long MSIHANDLE;
typedef int INSTALLMESSAGE;
cpp_quote("#endif")
[
......@@ -38,6 +39,7 @@ interface IWineMsiRemotePackage : IUnknown
HRESULT GetActiveDatabase( [out] MSIHANDLE *handle );
HRESULT GetProperty( [in] BSTR *property, [out] BSTR *value, [out] DWORD *size );
HRESULT SetProperty( [in] BSTR *property, [in] BSTR *value );
HRESULT ProcessMessage( [in] INSTALLMESSAGE message, [in] MSIHANDLE record );
}
[
......
......@@ -1142,7 +1142,28 @@ INT WINAPI MsiProcessMessage( MSIHANDLE hInstall, INSTALLMESSAGE eMessageType,
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE );
if( !package )
return ERROR_INVALID_HANDLE;
{
HRESULT hr;
IWineMsiRemotePackage *remote_package;
remote_package = (IWineMsiRemotePackage *)msi_get_remote( hInstall );
if (!remote_package)
return ERROR_INVALID_HANDLE;
hr = IWineMsiRemotePackage_ProcessMessage( remote_package, eMessageType, hRecord );
IWineMsiRemotePackage_Release( remote_package );
if (FAILED(hr))
{
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
return HRESULT_CODE(hr);
return ERROR_FUNCTION_FAILED;
}
return ERROR_SUCCESS;
}
record = msihandle2msiinfo( hRecord, MSIHANDLETYPE_RECORD );
if( !record )
......@@ -1548,6 +1569,13 @@ HRESULT WINAPI mrp_SetProperty( IWineMsiRemotePackage *iface, BSTR *property, BS
return HRESULT_FROM_WIN32(r);
}
HRESULT WINAPI mrp_ProcessMessage( IWineMsiRemotePackage *iface, INSTALLMESSAGE message, MSIHANDLE record )
{
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiProcessMessage(This->package, message, record);
return HRESULT_FROM_WIN32(r);
}
static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
{
mrp_QueryInterface,
......@@ -1557,6 +1585,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
mrp_GetActiveDatabase,
mrp_GetProperty,
mrp_SetProperty,
mrp_ProcessMessage,
};
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