From a6d7b6fc60b40cd9b73f1de0d7d74d96edc8b3a7 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 11 Mar 2008 16:14:44 +0100 Subject: [PATCH] msvcrt: Implemented __CppXcptFilter. --- dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcrt/cppexcept.c | 11 +++++++++++ dlls/msvcrt/cppexcept.h | 4 +++- dlls/msvcrt/msvcrt.spec | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 28ec8a31ba6..e39f0fb749c 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -75,7 +75,7 @@ @ extern _HUGE msvcrt._HUGE @ cdecl _Strftime(str long str ptr ptr) msvcrt._Strftime @ cdecl _XcptFilter(long ptr) msvcrt._XcptFilter -@ stub __CppXcptFilter +@ cdecl __CppXcptFilter(long ptr) msvcrt.__CppXcptFilter @ stub __CxxCallUnwindDtor @ stub __CxxCallUnwindVecDtor @ stub __CxxDetectRethrow diff --git a/dlls/msvcrt/cppexcept.c b/dlls/msvcrt/cppexcept.c index 08d928a21a8..6dafc9e8dc0 100644 --- a/dlls/msvcrt/cppexcept.c +++ b/dlls/msvcrt/cppexcept.c @@ -440,6 +440,17 @@ void __stdcall __CxxLongjmpUnwind( const struct MSVCRT___JUMP_BUFFER *buf ) #endif /* __i386__ */ + +/********************************************************************* + * __CppXcptFilter (MSVCRT.@) + */ +int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) +{ + /* only filter c++ exceptions */ + if (ex != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; + return _XcptFilter( ex, ptr ); +} + /********************************************************************* * _CxxThrowException (MSVCRT.@) */ diff --git a/dlls/msvcrt/cppexcept.h b/dlls/msvcrt/cppexcept.h index bf607c9680b..0818fa71c16 100644 --- a/dlls/msvcrt/cppexcept.h +++ b/dlls/msvcrt/cppexcept.h @@ -133,7 +133,9 @@ typedef struct __cxx_exception_type const cxx_type_info_table *type_info_table; /* list of types for this exception object */ } cxx_exception_type; -void _CxxThrowException(exception*,const cxx_exception_type*); +void CDECL _CxxThrowException(exception*,const cxx_exception_type*); +int CDECL _XcptFilter(NTSTATUS, PEXCEPTION_POINTERS); +int CDECL __CppXcptFilter(NTSTATUS, PEXCEPTION_POINTERS); static inline const char *dbgstr_type_info( const type_info *info ) { diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 7b821e6fc41..8f8ccf40331 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -75,6 +75,7 @@ @ extern _HUGE MSVCRT__HUGE @ cdecl _Strftime(str long str ptr ptr) @ cdecl _XcptFilter(long ptr) +@ cdecl __CppXcptFilter(long ptr) @ cdecl __CxxDetectRethrow(ptr) @ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) @ stdcall -i386 __CxxLongjmpUnwind(ptr)