diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in index e81dd4cc62d..6edb45fd1a8 100644 --- a/dlls/msi/Makefile.in +++ b/dlls/msi/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = msi.dll IMPORTLIB = libmsi.$(IMPLIBEXT) -IMPORTS = urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 kernel32 +IMPORTS = urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 kernel32 ntdll DELAYIMPORTS = odbccp32 EXTRALIBS = -luuid diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index e5162568a96..9170a7ea4a1 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -25,10 +25,12 @@ #include "winbase.h" #include "winerror.h" #include "msidefs.h" -#include "msipriv.h" #include "winuser.h" + +#include "msipriv.h" #include "wine/debug.h" #include "wine/unicode.h" +#include "wine/exception.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); @@ -583,7 +585,19 @@ static DWORD WINAPI ACTION_CallDllFunction( const GUID *guid ) { TRACE("calling %s\n", debugstr_w( info->target ) ); handle_msi_break( info->target ); - r = fn( hPackage ); + + __TRY + { + r = fn( hPackage ); + } + __EXCEPT_PAGE_FAULT + { + ERR("Custom action (%s:%s) caused a page fault: %08x\n", + debugstr_w(info->source), debugstr_w(info->target), GetExceptionCode()); + r = ERROR_SUCCESS; + } + __ENDTRY; + MsiCloseHandle( hPackage ); } else