James Hawkins wrote:
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
);
BSTR * is the same level of indirection as LPWSTR *, which is not what
you want. Also note that in general you can convert from BSTR to LPWSTR,
but not LPWSTR to BSTR (as LPWSTR don't have the string length secretly
stashed away before the string starts). The same applies to some of your
other patches too.
+
+ 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 );
--
Rob Shearman