James Hawkins : msi: Handle remote calls to MsiDoAction.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jul 4 06:56:51 CDT 2007
Module: wine
Branch: master
Commit: 0f321c0af9503219ab8667ce0a84bb75d38fc602
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f321c0af9503219ab8667ce0a84bb75d38fc602
Author: James Hawkins <truiken at gmail.com>
Date: Tue Jul 3 19:14:37 2007 -0700
msi: Handle remote calls to MsiDoAction.
---
dlls/msi/install.c | 27 ++++++++++++++++++++++++++-
dlls/msi/msiserver.idl | 1 +
dlls/msi/package.c | 8 ++++++++
3 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/install.c b/dlls/msi/install.c
index 91877e3..77e6756 100644
--- a/dlls/msi/install.c
+++ b/dlls/msi/install.c
@@ -20,6 +20,8 @@
/* Msi top level apis directly related to installs */
+#define COBJMACROS
+
#include <stdarg.h>
#include "windef.h"
@@ -28,7 +30,9 @@
#include "wine/debug.h"
#include "msi.h"
#include "msidefs.h"
+
#include "msipriv.h"
+#include "msiserver.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(msi);
@@ -67,7 +71,28 @@ UINT WINAPI MsiDoActionW( MSIHANDLE hInstall, LPCWSTR szAction )
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_DoAction( remote_package, (BSTR *)szAction );
+
+ IWineMsiRemotePackage_Release( remote_package );
+
+ if (FAILED(hr))
+ {
+ if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
+ return HRESULT_CODE(hr);
+
+ return ERROR_FUNCTION_FAILED;
+ }
+
+ return ERROR_SUCCESS;
+ }
ret = ACTION_PerformUIAction( package, szAction, -1 );
msiobj_release( &package->hdr );
diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl
index 8bcaaf7..550a44f 100644
--- a/dlls/msi/msiserver.idl
+++ b/dlls/msi/msiserver.idl
@@ -40,6 +40,7 @@ interface IWineMsiRemotePackage : IUnknown
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 );
+ HRESULT DoAction( [in] BSTR *action );
}
[
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index a81d6e5..153ea8c 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -1576,6 +1576,13 @@ HRESULT WINAPI mrp_ProcessMessage( IWineMsiRemotePackage *iface, INSTALLMESSAGE
return HRESULT_FROM_WIN32(r);
}
+HRESULT WINAPI mrp_DoAction( IWineMsiRemotePackage *iface, BSTR *action )
+{
+ msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
+ UINT r = MsiDoActionW(This->package, (LPWSTR)action);
+ return HRESULT_FROM_WIN32(r);
+}
+
static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
{
mrp_QueryInterface,
@@ -1586,6 +1593,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
mrp_GetProperty,
mrp_SetProperty,
mrp_ProcessMessage,
+ mrp_DoAction,
};
HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj )
More information about the wine-cvs
mailing list