diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index a9b8a5e8561..8ce5a6251a5 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -858,7 +858,7 @@ static void call_tls_callbacks( HMODULE module, UINT reason ) { (*callback)( module, reason, NULL ); } - __EXCEPT(NULL) + __EXCEPT_ALL { if (TRACE_ON(relay)) DPRINTF("%04x:exception in TLS callback (proc=%p,module=%p,reason=%s,reserved=0)\n", @@ -908,7 +908,7 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved if (!retv) status = STATUS_DLL_INIT_FAILED; } - __EXCEPT(NULL) + __EXCEPT_ALL { if (TRACE_ON(relay)) DPRINTF("%04x:exception in PE entry point (proc=%p,module=%p,reason=%s,res=%p)\n", diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index 52c8e8a228e..2e5ae146bc5 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -2068,7 +2068,7 @@ TMStubImpl_Invoke( args ); } - __EXCEPT(NULL) + __EXCEPT_ALL { DWORD dwExceptionCode = GetExceptionCode(); ERR("invoke call failed with exception 0x%08x (%d)\n", dwExceptionCode, dwExceptionCode); diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 1f6cd57a8b1..85c63d202ad 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -718,7 +718,7 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma } } } - __EXCEPT(NULL) + __EXCEPT_ALL { RetVal = NdrProxyErrorHandler(GetExceptionCode()); } diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 5404259c2c7..7849e4efb60 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -286,7 +286,7 @@ static RPC_STATUS process_request_packet(RpcConnection *conn, RpcPktRequestHdr * RPCRT4_SetThreadCurrentCallHandle(msg->Handle); __TRY { if (func) func(msg); - } __EXCEPT(NULL) { + } __EXCEPT_ALL { WARN("exception caught with code 0x%08x = %d\n", GetExceptionCode(), GetExceptionCode()); exception = TRUE; if (GetExceptionCode() == STATUS_ACCESS_VIOLATION) diff --git a/include/wine/exception.h b/include/wine/exception.h index 10b6c90fc87..3a14a18eb24 100644 --- a/include/wine/exception.h +++ b/include/wine/exception.h @@ -72,6 +72,7 @@ #define __FINALLY(func) __finally { (func)(!AbnormalTermination()); } #define __ENDTRY /*nothing*/ #define __EXCEPT_PAGE_FAULT __except(GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION) +#define __EXCEPT_ALL __except(EXCEPTION_EXECUTE_HANDLER) #else /* USE_COMPILER_EXCEPTIONS */ @@ -125,6 +126,8 @@ typedef void (CALLBACK *__WINE_FINALLY)(BOOL); /* convenience handler for page fault exceptions */ #define __EXCEPT_PAGE_FAULT __EXCEPT( (__WINE_FILTER)1 ) +/* convenience handler for all exception */ +#define __EXCEPT_ALL __EXCEPT( NULL ) #define GetExceptionInformation() (__eptr) #define GetExceptionCode() (__eptr->ExceptionRecord->ExceptionCode)