msi: Handle remote calls to MsiProcessMessage.

This commit is contained in:
James Hawkins 2007-07-03 19:13:45 -07:00 committed by Alexandre Julliard
parent d7d40b7dd3
commit be5eec45b5
2 changed files with 32 additions and 1 deletions

View File

@ -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 );
}
[

View File

@ -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 )