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

msi: Handle remote calls to MsiSetTargetPath.

parent 582be6a7
......@@ -544,7 +544,28 @@ UINT WINAPI MsiSetTargetPathW(MSIHANDLE hInstall, LPCWSTR szFolder,
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_SetTargetPath( remote_package, (BSTR *)szFolder, (BSTR *)szFolderPath );
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 = MSI_SetTargetPathW( package, szFolder, szFolderPath );
msiobj_release( &package->hdr );
......
......@@ -43,6 +43,7 @@ interface IWineMsiRemotePackage : IUnknown
HRESULT DoAction( [in] BSTR *action );
HRESULT Sequence( [in] BSTR *table, [in] int sequence );
HRESULT GetTargetPath( [in] BSTR *folder, [out] BSTR *value, [out] DWORD *size );
HRESULT SetTargetPath( [in] BSTR *folder, [in] BSTR *value );
HRESULT GetSourcePath( [in] BSTR *folder, [out] BSTR *value, [out] DWORD *size );
}
......
......@@ -1597,6 +1597,13 @@ HRESULT WINAPI mrp_GetTargetPath( IWineMsiRemotePackage *iface, BSTR *folder, BS
return HRESULT_FROM_WIN32(r);
}
HRESULT WINAPI mrp_SetTargetPath( IWineMsiRemotePackage *iface, BSTR *folder, BSTR *value)
{
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiSetTargetPathW(This->package, (LPWSTR)folder, (LPWSTR)value);
return HRESULT_FROM_WIN32(r);
}
HRESULT WINAPI mrp_GetSourcePath( IWineMsiRemotePackage *iface, BSTR *folder, BSTR *value, DWORD *size )
{
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
......@@ -1617,6 +1624,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
mrp_DoAction,
mrp_Sequence,
mrp_GetTargetPath,
mrp_SetTargetPath,
mrp_GetSourcePath,
};
......
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