James Hawkins : msi: Handle remote calls to MsiGetComponentState.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jul 4 06:56:56 CDT 2007
Module: wine
Branch: master
Commit: 254e27ad31dfb0e34b5474cd831baf73eef2f5c8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=254e27ad31dfb0e34b5474cd831baf73eef2f5c8
Author: James Hawkins <truiken at gmail.com>
Date: Tue Jul 3 19:19:16 2007 -0700
msi: Handle remote calls to MsiGetComponentState.
---
dlls/msi/install.c | 23 ++++++++++++++++++++++-
dlls/msi/msiserver.idl | 1 +
dlls/msi/package.c | 9 +++++++++
3 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/install.c b/dlls/msi/install.c
index e1a6b88..4ce0eb4 100644
--- a/dlls/msi/install.c
+++ b/dlls/msi/install.c
@@ -984,7 +984,28 @@ UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent,
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_GetComponentState(remote_package, (BSTR *)szComponent,
+ piInstalled, piAction);
+
+ if (FAILED(hr))
+ {
+ if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
+ return HRESULT_CODE(hr);
+
+ return ERROR_FUNCTION_FAILED;
+ }
+
+ return ERROR_SUCCESS;
+ }
+
ret = MSI_GetComponentStateW( package, szComponent, piInstalled, piAction);
msiobj_release( &package->hdr );
return ret;
diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl
index 5708a8b..c9f5887 100644
--- a/dlls/msi/msiserver.idl
+++ b/dlls/msi/msiserver.idl
@@ -50,6 +50,7 @@ interface IWineMsiRemotePackage : IUnknown
HRESULT GetMode( [in] MSIRUNMODE mode, [out] BOOL *ret );
HRESULT GetFeatureState( [in] BSTR *feature, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
HRESULT SetFeatureState( [in] BSTR *feature, [in] INSTALLSTATE state );
+ HRESULT GetComponentState( [in] BSTR *component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
}
[
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index a47cbda..79d984d 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -1633,6 +1633,14 @@ HRESULT WINAPI mrp_SetFeatureState( IWineMsiRemotePackage *iface, BSTR *feature,
return HRESULT_FROM_WIN32(r);
}
+HRESULT WINAPI mrp_GetComponentState( IWineMsiRemotePackage *iface, BSTR *component,
+ INSTALLSTATE *installed, INSTALLSTATE *action )
+{
+ msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
+ UINT r = MsiGetComponentStateW(This->package, (LPWSTR)component, installed, action);
+ return HRESULT_FROM_WIN32(r);
+}
+
static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
{
mrp_QueryInterface,
@@ -1651,6 +1659,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
mrp_GetMode,
mrp_GetFeatureState,
mrp_SetFeatureState,
+ mrp_GetComponentState,
};
HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj )
More information about the wine-cvs
mailing list