https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2a9ae858851c9af3153c9…
commit 2a9ae858851c9af3153c92abf15ed501221359ba
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 23:54:40 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:00 2022 +0100
[WINESYNC] msi: Add exception handling around all custom action RPC calls.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id baea371c3d4153bc4a718c07f46971d4d39aa9f3 by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/cond.y | 13 +++-
dll/win32/msi/custom.c | 5 ++
dll/win32/msi/format.c | 21 ++++-
dll/win32/msi/install.c | 195 +++++++++++++++++++++++++++++++++++++++++------
dll/win32/msi/msi.c | 12 ++-
dll/win32/msi/msipriv.h | 1 +
dll/win32/msi/msiquery.c | 92 +++++++++++++++++++---
dll/win32/msi/package.c | 57 ++++++++++++--
dll/win32/msi/suminfo.c | 12 ++-
9 files changed, 363 insertions(+), 45 deletions(-)
diff --git a/dll/win32/msi/cond.y b/dll/win32/msi/cond.y
index 780ca381f93..fccb61489be 100644
--- a/dll/win32/msi/cond.y
+++ b/dll/win32/msi/cond.y
@@ -39,6 +39,7 @@
#include "msipriv.h"
#include "winemsi_s.h"
#include "wine/debug.h"
+#include "wine/exception.h"
#include "wine/unicode.h"
#include "wine/list.h"
@@ -858,7 +859,17 @@ MSICONDITION WINAPI MsiEvaluateConditionW( MSIHANDLE hInstall,
LPCWSTR szConditi
if (!szCondition)
return MSICONDITION_NONE;
- return remote_EvaluateCondition(remote, szCondition);
+ __TRY
+ {
+ ret = remote_EvaluateCondition(remote, szCondition);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return ret;
}
ret = MSI_EvaluateConditionW( package, szCondition );
diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c
index 78e846d9590..56801363238 100644
--- a/dll/win32/msi/custom.c
+++ b/dll/win32/msi/custom.c
@@ -77,6 +77,11 @@ void __RPC_USER MIDL_user_free(void __RPC_FAR * ptr)
heap_free(ptr);
}
+LONG WINAPI rpc_filter(EXCEPTION_POINTERS *eptr)
+{
+ return I_RpcExceptionFilter(eptr->ExceptionRecord->ExceptionCode);
+}
+
UINT msi_schedule_action( MSIPACKAGE *package, UINT script, const WCHAR *action )
{
UINT count;
diff --git a/dll/win32/msi/format.c b/dll/win32/msi/format.c
index 06addd84741..deda22595f0 100644
--- a/dll/win32/msi/format.c
+++ b/dll/win32/msi/format.c
@@ -35,6 +35,7 @@
#include "msipriv.h"
#include "winemsi_s.h"
+#include "wine/exception.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(msi);
@@ -919,7 +920,15 @@ UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord,
if ((remote = msi_get_remote(hInstall)))
{
- r = remote_FormatRecord(remote, (struct wire_record *)&record->count,
&value);
+ __TRY
+ {
+ r = remote_FormatRecord(remote, (struct wire_record
*)&record->count, &value);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
if (!r)
r = msi_strncpyW(value, -1, szResult, sz);
@@ -968,7 +977,15 @@ UINT WINAPI MsiFormatRecordA(MSIHANDLE hinst, MSIHANDLE hrec, char
*buf, DWORD *
if ((remote = msi_get_remote(hinst)))
{
- r = remote_FormatRecord(remote, (struct wire_record *)&rec->count,
&value);
+ __TRY
+ {
+ r = remote_FormatRecord(remote, (struct wire_record *)&rec->count,
&value);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
if (!r)
r = msi_strncpyWtoA(value, -1, buf, sz, TRUE);
diff --git a/dll/win32/msi/install.c b/dll/win32/msi/install.c
index 5a149d74599..0afb6b29928 100644
--- a/dll/win32/msi/install.c
+++ b/dll/win32/msi/install.c
@@ -36,6 +36,7 @@
#include "winemsi_s.h"
#include "wine/heap.h"
#include "wine/debug.h"
+#include "wine/exception.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(msi);
@@ -80,7 +81,17 @@ UINT WINAPI MsiDoActionW( MSIHANDLE hInstall, LPCWSTR szAction )
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- return remote_DoAction(remote, szAction);
+ __TRY
+ {
+ ret = remote_DoAction(remote, szAction);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return ret;
}
ret = ACTION_PerformAction(package, szAction);
@@ -129,7 +140,17 @@ UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT
iSequenceMode
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- return remote_Sequence(remote, szTable, iSequenceMode);
+ __TRY
+ {
+ ret = remote_Sequence(remote, szTable, iSequenceMode);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return ret;
}
ret = MSI_Sequence( package, szTable );
msiobj_release( &package->hdr );
@@ -257,7 +278,16 @@ UINT WINAPI MsiGetTargetPathA(MSIHANDLE hinst, const char *folder,
char *buf, DW
return ERROR_INVALID_HANDLE;
}
- r = remote_GetTargetPath(remote, folderW, &path);
+ __TRY
+ {
+ r = remote_GetTargetPath(remote, folderW, &path);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!r)
r = msi_strncpyWtoA(path, -1, buf, sz, TRUE);
@@ -300,7 +330,16 @@ UINT WINAPI MsiGetTargetPathW(MSIHANDLE hinst, const WCHAR *folder,
WCHAR *buf,
if (!(remote = msi_get_remote(hinst)))
return ERROR_INVALID_HANDLE;
- r = remote_GetTargetPath(remote, folder, &path);
+ __TRY
+ {
+ r = remote_GetTargetPath(remote, folder, &path);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!r)
r = msi_strncpyW(path, -1, buf, sz);
@@ -396,7 +435,16 @@ UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder,
char *buf, DW
return ERROR_INVALID_HANDLE;
}
- r = remote_GetSourcePath(remote, folderW, &path);
+ __TRY
+ {
+ r = remote_GetSourcePath(remote, folderW, &path);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!r)
r = msi_strncpyWtoA(path, -1, buf, sz, TRUE);
@@ -439,7 +487,16 @@ UINT WINAPI MsiGetSourcePathW(MSIHANDLE hinst, const WCHAR *folder,
WCHAR *buf,
if (!(remote = msi_get_remote(hinst)))
return ERROR_INVALID_HANDLE;
- r = remote_GetSourcePath(remote, folder, &path);
+ __TRY
+ {
+ r = remote_GetSourcePath(remote, folder, &path);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!r)
r = msi_strncpyW(path, -1, buf, sz);
@@ -560,7 +617,17 @@ UINT WINAPI MsiSetTargetPathW(MSIHANDLE hInstall, LPCWSTR szFolder,
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- return remote_SetTargetPath(remote, szFolder, szFolderPath);
+ __TRY
+ {
+ ret = remote_SetTargetPath(remote, szFolder, szFolderPath);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return ret;
}
ret = MSI_SetTargetPathW( package, szFolder, szFolderPath );
@@ -616,7 +683,17 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
if (!(remote = msi_get_remote(hInstall)))
return FALSE;
- return remote_GetMode(remote, iRunMode);
+ __TRY
+ {
+ r = remote_GetMode(remote, iRunMode);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = FALSE;
+ }
+ __ENDTRY
+
+ return r;
}
switch (iRunMode)
@@ -699,7 +776,17 @@ UINT WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL
fState)
if (!(remote = msi_get_remote(hInstall)))
return FALSE;
- return remote_SetMode(remote, iRunMode, fState);
+ __TRY
+ {
+ r = remote_SetMode(remote, iRunMode, fState);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return r;
}
switch (iRunMode)
@@ -877,7 +964,17 @@ UINT WINAPI MsiSetFeatureStateW(MSIHANDLE hInstall, LPCWSTR
szFeature,
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- return remote_SetFeatureState(remote, szFeature, iState);
+ __TRY
+ {
+ rc = remote_SetFeatureState(remote, szFeature, iState);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ rc = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return rc;
}
rc = MSI_SetFeatureStateW(package,szFeature,iState);
@@ -1008,11 +1105,17 @@ UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall, LPCWSTR
szFeature,
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- /* FIXME: should use SEH */
- if (!piInstalled || !piAction)
- return RPC_X_NULL_REF_POINTER;
+ __TRY
+ {
+ ret = remote_GetFeatureState(remote, szFeature, piInstalled, piAction);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
- return remote_GetFeatureState(remote, szFeature, piInstalled, piAction);
+ return ret;
}
ret = MSI_GetFeatureStateW(package, szFeature, piInstalled, piAction);
@@ -1123,11 +1226,17 @@ UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR
szFeature,
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- /* FIXME: should use SEH */
- if (!piCost)
- return RPC_X_NULL_REF_POINTER;
+ __TRY
+ {
+ ret = remote_GetFeatureCost(remote, szFeature, iCostTree, iState, piCost);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
- return remote_GetFeatureCost(remote, szFeature, iCostTree, iState, piCost);
+ return ret;
}
if (!piCost)
@@ -1370,7 +1479,17 @@ UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall, LPCWSTR
szComponent,
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- return remote_SetComponentState(remote, szComponent, iState);
+ __TRY
+ {
+ ret = remote_SetComponentState(remote, szComponent, iState);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return ret;
}
ret = MSI_SetComponentStateW(package, szComponent, iState);
@@ -1401,11 +1520,17 @@ UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPCWSTR
szComponent,
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- /* FIXME: should use SEH */
- if (!piInstalled || !piAction)
- return RPC_X_NULL_REF_POINTER;
+ __TRY
+ {
+ ret = remote_GetComponentState(remote, szComponent, piInstalled, piAction);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
- return remote_GetComponentState(remote, szComponent, piInstalled, piAction);
+ return ret;
}
ret = MSI_GetComponentStateW( package, szComponent, piInstalled, piAction);
@@ -1429,7 +1554,17 @@ LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall)
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- return remote_GetLanguage(remote);
+ __TRY
+ {
+ langid = remote_GetLanguage(remote);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ langid = 0;
+ }
+ __ENDTRY
+
+ return langid;
}
langid = msi_get_property_int( package->db, szProductLanguage, 0 );
@@ -1478,7 +1613,17 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int
iInstallLevel)
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- return remote_SetInstallLevel(remote, iInstallLevel);
+ __TRY
+ {
+ r = remote_SetInstallLevel(remote, iInstallLevel);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return r;
}
r = MSI_SetInstallLevel( package, iInstallLevel );
diff --git a/dll/win32/msi/msi.c b/dll/win32/msi/msi.c
index db29625b255..7f3e394eeb2 100644
--- a/dll/win32/msi/msi.c
+++ b/dll/win32/msi/msi.c
@@ -47,6 +47,7 @@
#include "msxml2.h"
#include "wine/debug.h"
+#include "wine/exception.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(msi);
@@ -2026,7 +2027,16 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR
component, DWORD i
if (!(remote = msi_get_remote(handle)))
return ERROR_INVALID_HANDLE;
- r = remote_EnumComponentCosts(remote, component, index, state, buffer, cost,
temp);
+ __TRY
+ {
+ r = remote_EnumComponentCosts(remote, component, index, state, buffer, cost,
temp);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (r == ERROR_SUCCESS)
{
lstrcpynW(drive, buffer, *buflen);
diff --git a/dll/win32/msi/msipriv.h b/dll/win32/msi/msipriv.h
index d3dae5880da..b5f66339133 100644
--- a/dll/win32/msi/msipriv.h
+++ b/dll/win32/msi/msipriv.h
@@ -741,6 +741,7 @@ UINT msi_strcpy_to_awstring(const WCHAR *, int, awstring *, DWORD *)
DECLSPEC_HI
/* msi server interface */
extern MSIHANDLE msi_get_remote(MSIHANDLE handle) DECLSPEC_HIDDEN;
+extern LONG WINAPI rpc_filter(EXCEPTION_POINTERS *eptr) DECLSPEC_HIDDEN;
/* handle functions */
extern void *msihandle2msiinfo(MSIHANDLE handle, UINT type) DECLSPEC_HIDDEN;
diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c
index 83ec59c45dc..5c686a37be0 100644
--- a/dll/win32/msi/msiquery.c
+++ b/dll/win32/msi/msiquery.c
@@ -26,6 +26,7 @@
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
+#include "wine/exception.h"
#include "wine/unicode.h"
#include "msi.h"
#include "msiquery.h"
@@ -258,7 +259,16 @@ UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE hdb,
if (!(remote = msi_get_remote(hdb)))
return ERROR_INVALID_HANDLE;
- ret = remote_DatabaseOpenView(remote, szQuery, &remote_view);
+ __TRY
+ {
+ ret = remote_DatabaseOpenView(remote, szQuery, &remote_view);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!ret)
*phView = alloc_msi_remote_handle(remote_view);
return ret;
@@ -397,7 +407,16 @@ UINT WINAPI MsiViewFetch(MSIHANDLE hView, MSIHANDLE *record)
if (!(remote = msi_get_remote(hView)))
return ERROR_INVALID_HANDLE;
- ret = remote_ViewFetch(remote, &wire_rec);
+ __TRY
+ {
+ ret = remote_ViewFetch(remote, &wire_rec);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!ret)
{
ret = unmarshal_record(wire_rec, record);
@@ -447,7 +466,17 @@ UINT WINAPI MsiViewClose(MSIHANDLE hView)
if (!(remote = msi_get_remote(hView)))
return ERROR_INVALID_HANDLE;
- return remote_ViewClose(remote);
+ __TRY
+ {
+ ret = remote_ViewClose(remote);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return ret;
}
ret = MSI_ViewClose( query );
@@ -494,7 +523,15 @@ UINT WINAPI MsiViewExecute(MSIHANDLE hView, MSIHANDLE hRec)
if (!(remote = msi_get_remote(hView)))
return ERROR_INVALID_HANDLE;
- ret = remote_ViewExecute(remote, rec ? (struct wire_record *)&rec->count :
NULL);
+ __TRY
+ {
+ ret = remote_ViewExecute(remote, rec ? (struct wire_record
*)&rec->count : NULL);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
if (rec)
msiobj_release(&rec->hdr);
@@ -611,7 +648,16 @@ UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info,
MSIHANDLE *hR
if (!(remote = msi_get_remote(hView)))
return ERROR_INVALID_HANDLE;
- r = remote_ViewGetColumnInfo(remote, info, &wire_rec);
+ __TRY
+ {
+ r = remote_ViewGetColumnInfo(remote, info, &wire_rec);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!r)
{
r = unmarshal_record(wire_rec, hRec);
@@ -680,8 +726,17 @@ UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode,
if (!(remote = msi_get_remote(hView)))
return ERROR_INVALID_HANDLE;
- r = remote_ViewModify(remote, eModifyMode,
- (struct wire_record *)&rec->count, &wire_refreshed);
+ __TRY
+ {
+ r = remote_ViewModify(remote, eModifyMode,
+ (struct wire_record *)&rec->count, &wire_refreshed);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!r && (eModifyMode == MSIMODIFY_REFRESH || eModifyMode ==
MSIMODIFY_SEEK))
{
r = copy_remote_record(wire_refreshed, hRecord);
@@ -1004,7 +1059,16 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb,
if (!(remote = msi_get_remote(hdb)))
return ERROR_INVALID_HANDLE;
- r = remote_DatabaseGetPrimaryKeys(remote, table, &wire_rec);
+ __TRY
+ {
+ r = remote_DatabaseGetPrimaryKeys(remote, table, &wire_rec);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!r)
{
r = unmarshal_record(wire_rec, phRec);
@@ -1083,7 +1147,17 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentW(
if (!(remote = msi_get_remote(hDatabase)))
return MSICONDITION_ERROR;
- return remote_DatabaseIsTablePersistent(remote, szTableName);
+ __TRY
+ {
+ r = remote_DatabaseIsTablePersistent(remote, szTableName);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = MSICONDITION_ERROR;
+ }
+ __ENDTRY
+
+ return r;
}
r = MSI_DatabaseIsTablePersistent( db, szTableName );
diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c
index fa0831bc2de..e59bf93ebe0 100644
--- a/dll/win32/msi/package.c
+++ b/dll/win32/msi/package.c
@@ -44,6 +44,7 @@
#include "wine/heap.h"
#include "wine/debug.h"
+#include "wine/exception.h"
#include "wine/unicode.h"
#include "msipriv.h"
@@ -1746,8 +1747,16 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall)
}
else if ((remote = msi_get_remote(hInstall)))
{
- handle = remote_GetActiveDatabase(remote);
- handle = alloc_msi_remote_handle(handle);
+ __TRY
+ {
+ handle = remote_GetActiveDatabase(hInstall);
+ handle = alloc_msi_remote_handle(handle);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ handle = 0;
+ }
+ __ENDTRY
}
return handle;
@@ -2107,7 +2116,15 @@ INT WINAPI MsiProcessMessage( MSIHANDLE hInstall, INSTALLMESSAGE
eMessageType,
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- ret = remote_ProcessMessage(remote, eMessageType, (struct wire_record
*)&record->count);
+ __TRY
+ {
+ ret = remote_ProcessMessage(remote, eMessageType, (struct wire_record
*)&record->count);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
msiobj_release(&record->hdr);
return ret;
@@ -2237,7 +2254,17 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName,
LPCWSTR szValue
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
- return remote_SetProperty(remote, szName, szValue);
+ __TRY
+ {
+ ret = remote_SetProperty(remote, szName, szValue);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
+ return ret;
}
ret = msi_set_property( package->db, szName, szValue, -1 );
@@ -2414,7 +2441,16 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hinst, const char *name, char
*buf, DWORD
return ERROR_INVALID_HANDLE;
}
- r = remote_GetProperty(remote, nameW, &value, &len);
+ __TRY
+ {
+ r = remote_GetProperty(remote, nameW, &value, &len);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
heap_free(nameW);
if (!r)
@@ -2470,7 +2506,16 @@ UINT WINAPI MsiGetPropertyW(MSIHANDLE hinst, const WCHAR *name,
WCHAR *buf, DWOR
if (!(remote = msi_get_remote(hinst)))
return ERROR_INVALID_HANDLE;
- r = remote_GetProperty(remote, name, &value, &len);
+ __TRY
+ {
+ r = remote_GetProperty(remote, name, &value, &len);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ r = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!r)
{
/* String might contain embedded nulls.
diff --git a/dll/win32/msi/suminfo.c b/dll/win32/msi/suminfo.c
index f9bdf38edf3..3295a6a5e7d 100644
--- a/dll/win32/msi/suminfo.c
+++ b/dll/win32/msi/suminfo.c
@@ -30,6 +30,7 @@
#include "winnls.h"
#include "shlwapi.h"
#include "wine/debug.h"
+#include "wine/exception.h"
#include "wine/unicode.h"
#include "msi.h"
#include "msiquery.h"
@@ -543,7 +544,16 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
if (!(remote = msi_get_remote(hDatabase)))
return ERROR_INVALID_HANDLE;
- ret = remote_DatabaseGetSummaryInformation(remote, uiUpdateCount,
&remote_suminfo);
+ __TRY
+ {
+ ret = remote_DatabaseGetSummaryInformation(remote, uiUpdateCount,
&remote_suminfo);
+ }
+ __EXCEPT(rpc_filter)
+ {
+ ret = GetExceptionCode();
+ }
+ __ENDTRY
+
if (!ret)
*pHandle = alloc_msi_remote_handle(remote_suminfo);