https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3431091c60dd1afe4ebb54...
commit 3431091c60dd1afe4ebb5472b1cf73df70e289d8 Author: winesync ros-dev@reactos.org AuthorDate: Sat Mar 12 15:11:46 2022 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Sun Mar 20 19:27:34 2022 +0100
[WINESYNC] msi: Make MsiSetProperty() RPC-compatible.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id a73182ca542c00d15becd1d9e09f1c213082999d by Zebediah Figura z.figura12@gmail.com --- dll/win32/msi/package.c | 31 +++---------------------------- dll/win32/msi/winemsi.idl | 2 +- 2 files changed, 4 insertions(+), 29 deletions(-)
diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c index afdeaaf2165..483f6c4d597 100644 --- a/dll/win32/msi/package.c +++ b/dll/win32/msi/package.c @@ -2210,35 +2210,11 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue if( !package ) { MSIHANDLE remote; - HRESULT hr; - BSTR name = NULL, value = NULL;
if (!(remote = msi_get_remote(hInstall))) return ERROR_INVALID_HANDLE;
- name = SysAllocString( szName ); - value = SysAllocString( szValue ); - if ((!name && szName) || (!value && szValue)) - { - SysFreeString( name ); - SysFreeString( value ); - return ERROR_OUTOFMEMORY; - } - - hr = remote_SetProperty(remote, name, value); - - SysFreeString( name ); - SysFreeString( value ); - - if (FAILED(hr)) - { - if (HRESULT_FACILITY(hr) == FACILITY_WIN32) - return HRESULT_CODE(hr); - - return ERROR_FUNCTION_FAILED; - } - - return ERROR_SUCCESS; + return remote_SetProperty(remote, szName, szValue); }
ret = msi_set_property( package->db, szName, szValue, -1 ); @@ -2507,10 +2483,9 @@ UINT __cdecl remote_GetProperty(MSIHANDLE hinst, LPCWSTR property, LPWSTR *value return r; }
-HRESULT __cdecl remote_SetProperty(MSIHANDLE hinst, BSTR property, BSTR value) +UINT __cdecl remote_SetProperty(MSIHANDLE hinst, LPCWSTR property, LPCWSTR value) { - UINT r = MsiSetPropertyW(hinst, property, value); - return HRESULT_FROM_WIN32(r); + return MsiSetPropertyW(hinst, property, value); }
HRESULT __cdecl remote_ProcessMessage(MSIHANDLE hinst, INSTALLMESSAGE message, MSIHANDLE record) diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index 07a315b2171..7ea2e3cd57f 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -43,7 +43,7 @@ interface IWineMsiRemote
HRESULT remote_GetActiveDatabase( [in] MSIHANDLE hinst, [out] MSIHANDLE *handle ); UINT remote_GetProperty( [in] MSIHANDLE hinst, [in, string] LPCWSTR property, [out, string] LPWSTR *value, [out] DWORD *size ); - HRESULT remote_SetProperty( [in] MSIHANDLE hinst, [in] BSTR property, [in] BSTR value ); + UINT remote_SetProperty( [in] MSIHANDLE hinst, [in, string, unique] LPCWSTR property, [in, string, unique] LPCWSTR value ); HRESULT remote_ProcessMessage( [in] MSIHANDLE hinst, [in] INSTALLMESSAGE message, [in] MSIHANDLE record ); HRESULT remote_DoAction( [in] MSIHANDLE hinst, [in] BSTR action ); HRESULT remote_Sequence( [in] MSIHANDLE hinst, [in] BSTR table, [in] int sequence );