Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenexcpt.h
Go to the documentation of this file.
00001 00006 #ifndef _INC_EXCPT 00007 #define _INC_EXCPT 00008 00009 #include <crtdefs.h> 00010 00011 #pragma pack(push,_CRT_PACKING) 00012 00013 #ifdef __cplusplus 00014 extern "C" { 00015 #endif 00016 00017 typedef enum _EXCEPTION_DISPOSITION 00018 { 00019 ExceptionContinueExecution, 00020 ExceptionContinueSearch, 00021 ExceptionNestedException, 00022 ExceptionCollidedUnwind, 00023 } EXCEPTION_DISPOSITION; 00024 00025 #if (defined(_X86_) && !defined(__x86_64)) 00026 struct _EXCEPTION_RECORD; 00027 struct _CONTEXT; 00028 00029 EXCEPTION_DISPOSITION __cdecl _except_handler(struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,void *_DispatcherContext); 00030 #elif defined(__ia64__) 00031 00032 typedef struct _EXCEPTION_POINTERS *Exception_info_ptr; 00033 struct _EXCEPTION_RECORD; 00034 struct _CONTEXT; 00035 struct _DISPATCHER_CONTEXT; 00036 00037 __MINGW_EXTENSION _CRTIMP EXCEPTION_DISPOSITION __cdecl __C_specific_handler (struct _EXCEPTION_RECORD *_ExceptionRecord,unsigned __int64 _MemoryStackFp,unsigned __int64 _BackingStoreFp,struct _CONTEXT *_ContextRecord,struct _DISPATCHER_CONTEXT *_DispatcherContext,unsigned __int64 _GlobalPointer); 00038 #elif defined(__x86_64) 00039 00040 struct _EXCEPTION_RECORD; 00041 struct _CONTEXT; 00042 struct _DISPATCHER_CONTEXT; 00043 00044 _CRTIMP EXCEPTION_DISPOSITION __cdecl __C_specific_handler (struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,struct _DISPATCHER_CONTEXT *_DispatcherContext); 00045 #endif 00046 00047 #ifdef _MSC_VER 00048 #define GetExceptionCode _exception_code 00049 #define exception_code _exception_code 00050 #define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info 00051 #define exception_info (struct _EXCEPTION_POINTERS *)_exception_info 00052 #define AbnormalTermination _abnormal_termination 00053 #define abnormal_termination _abnormal_termination 00054 unsigned long __cdecl _exception_code(void); 00055 void *__cdecl _exception_info(void); 00056 int __cdecl _abnormal_termination(void); 00057 #endif 00058 00059 #define EXCEPTION_EXECUTE_HANDLER 1 00060 #define EXCEPTION_CONTINUE_SEARCH 0 00061 #define EXCEPTION_CONTINUE_EXECUTION -1 00062 00063 #if 0 00064 /* CRT stuff */ 00065 typedef void (__cdecl * _PHNDLR)(int); 00066 00067 struct _XCPT_ACTION { 00068 unsigned long XcptNum; 00069 int SigNum; 00070 _PHNDLR XcptAction; 00071 }; 00072 00073 extern struct _XCPT_ACTION _XcptActTab[]; 00074 extern int _XcptActTabCount; 00075 extern int _XcptActTabSize; 00076 extern int _First_FPE_Indx; 00077 extern int _Num_FPE; 00078 00079 int __cdecl __CppXcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr); 00080 int __cdecl _XcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr); 00081 00082 /* 00083 * The type of function that is expected as an exception handler to be 00084 * installed with _try1. 00085 */ 00086 typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*); 00087 00088 #ifndef HAVE_NO_SEH 00089 /* 00090 * This is not entirely necessary, but it is the structure installed by 00091 * the _try1 primitive below. 00092 */ 00093 typedef struct _EXCEPTION_REGISTRATION { 00094 struct _EXCEPTION_REGISTRATION *prev; 00095 EXCEPTION_DISPOSITION (*handler)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*); 00096 } EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION; 00097 00098 typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD; 00099 typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD; 00100 #endif 00101 00102 #if (defined(_X86_) && !defined(__x86_64)) 00103 #define __try1(pHandler) \ 00104 __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler)); 00105 00106 #define __except1 \ 00107 __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \ 00108 : : : "%eax"); 00109 #elif defined(__x86_64) 00110 #define __try1(pHandler) \ 00111 __asm__ ("pushq %0;pushq %%gs:0;movq %%rsp,%%gs:0;" : : "g" (pHandler)); 00112 00113 #define __except1 \ 00114 __asm__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq $16,%%rsp;" \ 00115 : : : "%rax"); 00116 #else 00117 #define __try1(pHandler) 00118 #define __except1 00119 #endif 00120 00121 #endif // 0 00122 00123 #ifdef __cplusplus 00124 } 00125 #endif 00126 00127 #pragma pack(pop) 00128 #endif Generated on Sat May 26 2012 04:28:26 for ReactOS by
1.7.6.1
|