2 Copyright (c) 2004/2005 KJK::Hyperion
4 Permission is hereby granted, free of charge, to any person obtaining a copy of
5 this software and associated documentation files (the "Software"), to deal in
6 the Software without restriction, including without limitation the rights to
7 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 of the Software, and to permit persons to whom the Software is furnished to do
9 so, subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 #ifndef KJK_PSEH_FRAMEBASED_INTERNAL_H_
24 #define KJK_PSEH_FRAMEBASED_INTERNAL_H_
26 struct _EXCEPTION_RECORD
;
27 struct _EXCEPTION_POINTERS
;
30 typedef int (__cdecl
* _SEHFrameHandler_t
)
32 struct _EXCEPTION_RECORD
*,
38 typedef struct __SEHRegistration
40 struct __SEHRegistration
* SER_Prev
;
41 _SEHFrameHandler_t SER_Handler
;
45 struct __SEHPortableFrame
;
46 struct __SEHPortableTryLevel
;
48 typedef long (__stdcall
* _SEHFilter_t
)
50 struct _EXCEPTION_POINTERS
*,
51 struct __SEHPortableFrame
*
54 typedef __declspec(noreturn
) void (__stdcall
* _SEHHandler_t
)
56 struct __SEHPortableTryLevel
*
59 typedef void (__stdcall
* _SEHFinally_t
)
61 struct __SEHPortableFrame
*
64 typedef struct __SEHHandlers
66 _SEHFilter_t SH_Filter
;
67 _SEHFinally_t SH_Finally
;
71 typedef struct __SEHPortableTryLevel
73 struct __SEHPortableTryLevel
* SPT_Next
;
74 const _SEHHandlers_t
* SPT_Handlers
;
76 _SEHPortableTryLevel_t
;
78 typedef struct __SEHPortableFrame
80 _SEHRegistration_t SPF_Registration
;
81 unsigned long SPF_Code
;
82 _SEHHandler_t SPF_Handler
;
83 _SEHPortableTryLevel_t
* SPF_TopTryLevel
;
92 extern void __stdcall _SEHEnterFrame_s
94 _SEHPortableFrame_t
*,
95 _SEHPortableTryLevel_t
*
98 extern void __stdcall
_SEHEnterTry_s(_SEHPortableTryLevel_t
*);
99 extern void __stdcall
_SEHLeave_s(void);
101 #if !defined(_SEH_NO_FASTCALL)
103 # define _SEH_FASTCALL __fastcall
105 # define _SEH_FASTCALL __stdcall
108 extern void _SEH_FASTCALL _SEHEnterFrame_f
110 _SEHPortableFrame_t
*,
111 _SEHPortableTryLevel_t
*
114 extern void _SEH_FASTCALL
_SEHEnterTry_f(_SEHPortableTryLevel_t
*);
115 extern void _SEH_FASTCALL
_SEHLeave_f(void);
117 # define _SEHEnterFrame _SEHEnterFrame_f
118 # define _SEHEnterTry _SEHEnterTry_f
119 # define _SEHLeave _SEHLeave_f
121 # define _SEHEnterFrame _SEHEnterFrame_s
122 # define _SEHEnterTry _SEHEnterTry_s
123 # define _SEHLeave _SEHLeave_s