msi: Handle remote calls to MsiSetFeatureState.
This commit is contained in:
parent
c96f1d524b
commit
f45b3ce60e
|
@ -749,8 +749,29 @@ UINT WINAPI MsiSetFeatureStateW(MSIHANDLE hInstall, LPCWSTR szFeature,
|
||||||
|
|
||||||
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
|
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
|
||||||
if (!package)
|
if (!package)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
IWineMsiRemotePackage *remote_package;
|
||||||
|
|
||||||
|
remote_package = (IWineMsiRemotePackage *)msi_get_remote(hInstall);
|
||||||
|
if (!remote_package)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
hr = IWineMsiRemotePackage_SetFeatureState(remote_package, (BSTR *)szFeature, iState);
|
||||||
|
|
||||||
|
IWineMsiRemotePackage_Release(remote_package);
|
||||||
|
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
|
||||||
|
return HRESULT_CODE(hr);
|
||||||
|
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
rc = MSI_SetFeatureStateW(package,szFeature,iState);
|
rc = MSI_SetFeatureStateW(package,szFeature,iState);
|
||||||
|
|
||||||
msiobj_release( &package->hdr );
|
msiobj_release( &package->hdr );
|
||||||
|
|
|
@ -27,6 +27,7 @@ cpp_quote("#if 0")
|
||||||
typedef unsigned long MSIHANDLE;
|
typedef unsigned long MSIHANDLE;
|
||||||
typedef int INSTALLMESSAGE;
|
typedef int INSTALLMESSAGE;
|
||||||
typedef int MSIRUNMODE;
|
typedef int MSIRUNMODE;
|
||||||
|
typedef int INSTALLSTATE;
|
||||||
cpp_quote("#endif")
|
cpp_quote("#endif")
|
||||||
|
|
||||||
[
|
[
|
||||||
|
@ -47,6 +48,7 @@ interface IWineMsiRemotePackage : IUnknown
|
||||||
HRESULT SetTargetPath( [in] BSTR *folder, [in] BSTR *value );
|
HRESULT SetTargetPath( [in] BSTR *folder, [in] BSTR *value );
|
||||||
HRESULT GetSourcePath( [in] BSTR *folder, [out] BSTR *value, [out] DWORD *size );
|
HRESULT GetSourcePath( [in] BSTR *folder, [out] BSTR *value, [out] DWORD *size );
|
||||||
HRESULT GetMode( [in] MSIRUNMODE mode, [out] BOOL *ret );
|
HRESULT GetMode( [in] MSIRUNMODE mode, [out] BOOL *ret );
|
||||||
|
HRESULT SetFeatureState( [in] BSTR *feature, [in] INSTALLSTATE state );
|
||||||
}
|
}
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
@ -1618,6 +1618,13 @@ HRESULT WINAPI mrp_GetMode( IWineMsiRemotePackage *iface, MSIRUNMODE mode, BOOL
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI mrp_SetFeatureState( IWineMsiRemotePackage *iface, BSTR *feature, INSTALLSTATE state )
|
||||||
|
{
|
||||||
|
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
|
||||||
|
UINT r = MsiSetFeatureStateW(This->package, (LPWSTR)feature, state);
|
||||||
|
return HRESULT_FROM_WIN32(r);
|
||||||
|
}
|
||||||
|
|
||||||
static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
|
static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
|
||||||
{
|
{
|
||||||
mrp_QueryInterface,
|
mrp_QueryInterface,
|
||||||
|
@ -1634,6 +1641,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
|
||||||
mrp_SetTargetPath,
|
mrp_SetTargetPath,
|
||||||
mrp_GetSourcePath,
|
mrp_GetSourcePath,
|
||||||
mrp_GetMode,
|
mrp_GetMode,
|
||||||
|
mrp_SetFeatureState,
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj )
|
HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj )
|
||||||
|
|
Loading…
Reference in New Issue