ReactOS  0.4.15-dev-1070-ge1a01de
framehandler.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS C++ runtime library
3  * LICENSE: GPLv2+ - See COPYING in the top level directory
4  * PURPOSE: __CxxFrameHandler3 to __CxxFrameHandler wrapper
5  * PROGRAMMER: Thomas Faber (thomas.faber@reactos.org)
6  */
7 
8 #define WIN32_NO_STATUS
9 #include <windef.h>
10 #include <winbase.h>
11 #include <ndk/rtltypes.h>
12 
13 #define WINE_NO_TRACE_MSGS
14 #include <wine/debug.h>
15 #include <wine/exception.h>
16 #include <internal/wine/msvcrt.h>
18 
21  const cxx_function_descr *descr);
22 
23 DWORD
31 {
32  cxx_function_descr stub_descr;
33 
34  if (descr->magic != CXX_FRAME_MAGIC_VC8)
35  return CallCxxFrameHandler(rec, frame, context, dispatch, descr);
36 
37  if ((descr->flags & FUNC_DESCR_SYNCHRONOUS) &&
38  (rec->ExceptionCode != CXX_EXCEPTION))
39  {
40  return ExceptionContinueSearch; /* handle only c++ exceptions */
41  }
42 
43  stub_descr = *descr;
44  stub_descr.magic = CXX_FRAME_MAGIC_VC7;
45  return CallCxxFrameHandler(rec, frame, context, dispatch, &stub_descr);
46 }
DWORD CDECL CallCxxFrameHandler(PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD *frame, PCONTEXT context, EXCEPTION_REGISTRATION_RECORD **dispatch, const cxx_function_descr *descr)
Definition: http.c:7094
#define CXX_FRAME_MAGIC_VC8
Definition: cppexcept.h:28
#define CXX_EXCEPTION
Definition: cppexcept.h:29
#define FUNC_DESCR_SYNCHRONOUS
Definition: cppexcept.h:108
#define CXX_FRAME_MAGIC_VC7
Definition: cppexcept.h:27
const char * descr
Definition: boot.c:45
unsigned long DWORD
Definition: ntddk_ex.h:95
#define __stdcall
Definition: typedefs.h:25
void dispatch(HANDLE hStopEvent)
Definition: dispatch.c:66
#define _In_
Definition: no_sal2.h:204
#define CDECL
Definition: compat.h:29
DWORD __stdcall CxxHandleV8Frame(_In_ PEXCEPTION_RECORD rec, _In_ EXCEPTION_REGISTRATION_RECORD *frame, _In_ PCONTEXT context, _In_ EXCEPTION_REGISTRATION_RECORD **dispatch, _In_ const cxx_function_descr *descr)
Definition: framehandler.c:25