mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
upgrade to PSEH2 (note, the new macros are still named _SEH_*, not _SEH2_*!)
svn path=/trunk/; revision=15063
This commit is contained in:
parent
9c40b2406e
commit
6ab4605c43
25 changed files with 554 additions and 295 deletions
|
@ -719,9 +719,9 @@ ExVerifySuite(
|
|||
SUITE_TYPE SuiteType
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
LONG
|
||||
STDCALL
|
||||
ExSystemExceptionFilter();
|
||||
ExSystemExceptionFilter(VOID);
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
|
|
|
@ -51,6 +51,16 @@
|
|||
# define _SEH_CONCAT(X_, Y_) _SEH_CONCAT1(X_, Y_)
|
||||
#endif
|
||||
|
||||
/*
|
||||
Note: just define __inline to an empty symbol if your C compiler doesn't
|
||||
support it
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
# ifndef __inline
|
||||
# define __inline inline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Locals sharing support */
|
||||
#define _SEH_LOCALS_TYPENAME(BASENAME_) \
|
||||
struct _SEH_CONCAT(_SEHLocalsTag, BASENAME_)
|
||||
|
@ -64,8 +74,8 @@
|
|||
_SEHPLocals = &_SEHLocals;
|
||||
|
||||
/* Dummy locals */
|
||||
static _SEH_LOCALS_TYPENAME(_SEHDummyLocals) { int Dummy_; } _SEHLocals;
|
||||
static void __inline _SEHDummyLocalsUser(void) { (void)_SEHLocals; }
|
||||
static int _SEHLocals;
|
||||
static void * const _SEHDummyLocals = &_SEHLocals;
|
||||
|
||||
#include <pseh/framebased.h>
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include <pseh/framebased/internal.h>
|
||||
#include <pseh/excpt.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#ifndef offsetof
|
||||
# include <stddef.h>
|
||||
|
@ -46,35 +45,34 @@
|
|||
# define _SEHSetJmp setjmp
|
||||
# define _SEHJmpBuf_t jmp_buf
|
||||
#endif
|
||||
|
||||
unsigned long DbgPrint(char * Format,...);
|
||||
typedef struct __SEHFrame
|
||||
{
|
||||
_SEHPortableFrame_t SEH_Header;
|
||||
_SEHJmpBuf_t SEH_JmpBuf;
|
||||
void * SEH_Locals;
|
||||
}
|
||||
_SEHFrame_t;
|
||||
|
||||
/*
|
||||
Note: just define __inline to an empty symbol if your C compiler doesn't
|
||||
support it
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
# ifndef __inline
|
||||
# define __inline inline
|
||||
# endif
|
||||
#endif
|
||||
typedef struct __SEHTryLevel
|
||||
{
|
||||
_SEHPortableTryLevel_t ST_Header;
|
||||
_SEHJmpBuf_t ST_JmpBuf;
|
||||
}
|
||||
_SEHTryLevel_t;
|
||||
|
||||
static __declspec(noreturn) __inline void __stdcall _SEHCompilerSpecificHandler
|
||||
(
|
||||
_SEHPortableFrame_t * frame
|
||||
_SEHPortableTryLevel_t * trylevel
|
||||
)
|
||||
{
|
||||
_SEHFrame_t * myframe;
|
||||
myframe = (_SEHFrame_t *)(((char *)frame) - offsetof(_SEHFrame_t, SEH_Header));
|
||||
_SEHLongJmp(myframe->SEH_JmpBuf, 1);
|
||||
_SEHTryLevel_t * mytrylevel;
|
||||
mytrylevel = _SEH_CONTAINING_RECORD(trylevel, _SEHTryLevel_t, ST_Header);
|
||||
_SEHLongJmp(mytrylevel->ST_JmpBuf, 1);
|
||||
}
|
||||
|
||||
static const int _SEHScopeKind = 1;
|
||||
static _SEHPortableFrame_t * const _SEHPortableFrame = 0;
|
||||
|
||||
/* SHARED LOCALS */
|
||||
/* Access the locals for the current frame */
|
||||
#define _SEH_ACCESS_LOCALS(LOCALS_) \
|
||||
|
@ -111,7 +109,7 @@ static __declspec(noreturn) __inline void __stdcall _SEHCompilerSpecificHandler
|
|||
|
||||
/* FINALLY FUNCTIONS */
|
||||
/* Declares a finally function's prototype */
|
||||
#define _SEH_FINALLY(NAME_) \
|
||||
#define _SEH_FINALLYFUNC(NAME_) \
|
||||
void __stdcall NAME_ \
|
||||
( \
|
||||
struct __SEHPortableFrame * _SEHPortableFrame \
|
||||
|
@ -122,199 +120,269 @@ static __declspec(noreturn) __inline void __stdcall _SEHCompilerSpecificHandler
|
|||
_SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ())
|
||||
|
||||
#define _SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ARGS_) \
|
||||
static __inline _SEH_FINALLY(WRAPPER_) \
|
||||
static __inline _SEH_FINALLYFUNC(WRAPPER_) \
|
||||
{ \
|
||||
NAME_ ARGS_; \
|
||||
}
|
||||
|
||||
#define _SEH_WRAP_FINALLY_LOCALS_ARGS(WRAPPER_, LOCALS_, NAME_, ARGS_) \
|
||||
static __inline _SEH_FINALLY(WRAPPER_) \
|
||||
static __inline _SEH_FINALLYFUNC(WRAPPER_) \
|
||||
{ \
|
||||
_SEH_ACCESS_LOCALS(LOCALS_); \
|
||||
NAME_ ARGS_; \
|
||||
}
|
||||
|
||||
/* SAFE BLOCKS */
|
||||
#define _SEH_TRY_FINALLY(FINALLY_) \
|
||||
#define _SEHX_TRY_FINALLY(FINALLY_) \
|
||||
_SEH_TRY_FILTER_FINALLY \
|
||||
( \
|
||||
_SEH_STATIC_FILTER(_SEH_CONTINUE_SEARCH), \
|
||||
(FINALLY_) \
|
||||
)
|
||||
|
||||
#define _SEH_END_FINALLY _SEH_HANDLE _SEH_END
|
||||
#define _SEHX_END_FINALLY _SEH_HANDLE _SEH_END
|
||||
|
||||
#define _SEH_TRY_FILTER(FILTER_) \
|
||||
_SEH_TRY_FILTER_FINALLY((FILTER_), NULL)
|
||||
#define _SEHX_TRY_FILTER(FILTER_) \
|
||||
_SEH_TRY_FILTER_FINALLY((FILTER_), 0)
|
||||
|
||||
#define _SEH_TRY_HANDLE_FINALLY(FINALLY_) \
|
||||
#define _SEHX_TRY_HANDLE_FINALLY(FINALLY_) \
|
||||
_SEH_TRY_FILTER_FINALLY \
|
||||
( \
|
||||
_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER), \
|
||||
(FINALLY_) \
|
||||
)
|
||||
|
||||
#define _SEH_TRY \
|
||||
_SEH_TRY_HANDLE_FINALLY(NULL)
|
||||
#define _SEHX_TRY \
|
||||
_SEH_TRY_HANDLE_FINALLY(0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define _SEH_DECLARE_HANDLERS(FILTER_, FINALLY_) \
|
||||
const _SEHHandlers_t _SEHHandlers = \
|
||||
{ \
|
||||
(FILTER_), \
|
||||
_SEHCompilerSpecificHandler, \
|
||||
(FINALLY_) \
|
||||
};
|
||||
static const _SEHHandlers_t _SEHHandlers = { (FILTER_), (FINALLY_) };
|
||||
#else
|
||||
# define _SEH_DECLARE_HANDLERS(FILTER_, FINALLY_) \
|
||||
_SEHHandlers_t _SEHHandlers = \
|
||||
{ \
|
||||
(0), \
|
||||
_SEHCompilerSpecificHandler, \
|
||||
(0) \
|
||||
}; \
|
||||
_SEHHandlers_t _SEHHandlers = { (0), (0) }; \
|
||||
_SEHHandlers.SH_Filter = (FILTER_); \
|
||||
_SEHHandlers.SH_Finally = (FINALLY_);
|
||||
#endif
|
||||
|
||||
#define _SEH_TRY_FILTER_FINALLY(FILTER_, FINALLY_) \
|
||||
#define _SEHX_TRY_FILTER_FINALLY(FILTER_, FINALLY_) \
|
||||
{ \
|
||||
_SEHFrame_t * _SEHFrame; \
|
||||
volatile _SEHPortableFrame_t * _SEHPortableFrame; \
|
||||
_SEHPortableFrame_t * const _SEHCurPortableFrame = _SEHPortableFrame; \
|
||||
\
|
||||
_SEH_DECLARE_HANDLERS(FILTER_, FINALLY_); \
|
||||
\
|
||||
_SEHFrame = _alloca(sizeof(_SEHFrame_t)); \
|
||||
_SEHFrame->SEH_Header.SPF_Handlers = &_SEHHandlers; \
|
||||
_SEHFrame->SEH_Locals = &_SEHLocals; \
|
||||
\
|
||||
_SEHPortableFrame = &_SEHFrame->SEH_Header; \
|
||||
(void)_SEHPortableFrame; \
|
||||
\
|
||||
if(_SEHSetJmp(_SEHFrame->SEH_JmpBuf) == 0) \
|
||||
{ \
|
||||
_SEHEnter(&_SEHFrame->SEH_Header); \
|
||||
_SEHFrame_t _SEHFrame; \
|
||||
_SEHTryLevel_t _SEHTryLevel; \
|
||||
_SEHPortableFrame_t * const _SEHPortableFrame = \
|
||||
_SEHScopeKind ? &_SEHFrame.SEH_Header : _SEHCurPortableFrame; \
|
||||
\
|
||||
do \
|
||||
{
|
||||
|
||||
#define _SEH_HANDLE \
|
||||
(void)_SEHPortableFrame; \
|
||||
\
|
||||
_SEH_DECLARE_HANDLERS((FILTER_), (FINALLY_)); \
|
||||
\
|
||||
_SEHTryLevel.ST_Header.SPT_Handlers = &_SEHHandlers; \
|
||||
\
|
||||
if(_SEHScopeKind) \
|
||||
{ \
|
||||
if(&_SEHLocals != _SEHDummyLocals) \
|
||||
_SEHFrame.SEH_Locals = &_SEHLocals; \
|
||||
\
|
||||
_SEHFrame.SEH_Header.SPF_Handler = _SEHCompilerSpecificHandler; \
|
||||
_SEHEnterFrame(&_SEHFrame.SEH_Header, &_SEHTryLevel.ST_Header); \
|
||||
} \
|
||||
while(0); \
|
||||
else \
|
||||
_SEHEnterTry(&_SEHTryLevel.ST_Header); \
|
||||
\
|
||||
_SEHLeave(&_SEHFrame->SEH_Header); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_SEHLeave(&_SEHFrame->SEH_Header); \
|
||||
{ \
|
||||
static const int _SEHScopeKind = 0; \
|
||||
(void)_SEHScopeKind; \
|
||||
\
|
||||
if(_SEHSetJmp(_SEHTryLevel.ST_JmpBuf) == 0) \
|
||||
{ \
|
||||
for(;;) \
|
||||
{
|
||||
|
||||
#define _SEH_END \
|
||||
} \
|
||||
#define _SEHX_HANDLE \
|
||||
\
|
||||
if(_SEHHandlers.SH_Finally) \
|
||||
_SEHHandlers.SH_Finally(&_SEHFrame->SEH_Header); \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
_SEHLeave(); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_SEHLeave();
|
||||
|
||||
#define _SEHX_END \
|
||||
} \
|
||||
\
|
||||
if(_SEHHandlers.SH_Finally) \
|
||||
_SEHHandlers.SH_Finally(_SEHPortableFrame); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define _SEHX_LEAVE break
|
||||
|
||||
#define _SEHX_GetExceptionCode() (unsigned long)(_SEHPortableFrame->SPF_Code)
|
||||
|
||||
#define _SEHX_GetExceptionPointers() \
|
||||
((struct _EXCEPTION_POINTERS *)_SEHExceptionPointers)
|
||||
|
||||
#define _SEHX_AbnormalTermination() (_SEHPortableFrame->SPF_Code != 0)
|
||||
|
||||
/* New syntax */
|
||||
|
||||
/*
|
||||
NOTE: do not move, remove or modify any instance of _SEH2_ASSUME and
|
||||
_SEH2_ASSUMING without doing extensive tests for correctness. Compilers can
|
||||
generate the wrong code in presence of __assume in unpredictable ways. BE SURE
|
||||
IT DOESN'T HAPPEN
|
||||
*/
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200)
|
||||
# define _SEH2_ASSUME(X_) __assume(X_)
|
||||
# if !defined(_SEH_NO_NATIVE_NLG)
|
||||
/*
|
||||
If we use the native setjmp, the compiler stops keeping track of variables, so
|
||||
their actual values don't matter anymore. Optimize out some assignments
|
||||
*/
|
||||
# define _SEH2_ASSUMING(X_)
|
||||
# else
|
||||
/* No native setjmp, no magic, no assumptions. Actually set the values */
|
||||
# define _SEH2_ASSUMING(X_) X_
|
||||
# endif
|
||||
#else
|
||||
# define _SEH2_ASSUME(X_)
|
||||
# define _SEH2_ASSUMING(X_) X_
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define _SEH2_INIT_CONST static const
|
||||
#else
|
||||
# define _SEH2_INIT_CONST register const
|
||||
#endif
|
||||
|
||||
#define _SEH_LEAVE break
|
||||
|
||||
#define _SEH_GetExceptionCode() (unsigned long)(_SEHPortableFrame->SPF_Code)
|
||||
|
||||
#define _SEH_GetExceptionPointers() \
|
||||
((struct _EXCEPTION_POINTERS *)_SEHExceptionPointers)
|
||||
|
||||
#define _SEH_AbnormalTermination() (_SEHPortableFrame->SPF_Code != 0)
|
||||
|
||||
/* New syntax */
|
||||
#define _SEH2_STATE_INIT_EXCEPT (1)
|
||||
#define _SEH2_STATE_INIT_FINALLY (_SEH2_STATE_INIT_EXCEPT + 1)
|
||||
#define _SEH2_STATE_BODY (_SEH2_STATE_INIT_FINALLY + 1)
|
||||
#define _SEH2_STATE_HANDLER (_SEH2_STATE_BODY + 1)
|
||||
#define _SEH2_STATE_DONE (_SEH2_STATE_HANDLER + 1)
|
||||
|
||||
#define _SEH2_LEAVE { _SEH2State = _SEH2_STATE_DONE; break; }
|
||||
|
||||
#define _SEH2_TRY \
|
||||
{ \
|
||||
int _SEH2State; \
|
||||
_SEHFilter_t _SEH2Filter; \
|
||||
_SEHFinally_t _SEH2Finally; \
|
||||
\
|
||||
_SEHFrame_t * _SEHFrame; \
|
||||
volatile _SEHPortableFrame_t * _SEHPortableFrame; \
|
||||
\
|
||||
for(_SEH2State = 0; _SEH2State < _SEH2_STATE_DONE; ++ _SEH2State) \
|
||||
#define _SEH_TRY \
|
||||
{ \
|
||||
switch(_SEH2State) \
|
||||
_SEH2_INIT_CONST int _SEH2TopTryLevel = (_SEHScopeKind != 0); \
|
||||
_SEHPortableFrame_t * const _SEH2CurPortableFrame = _SEHPortableFrame; \
|
||||
\
|
||||
{ \
|
||||
case _SEH2_STATE_BODY: \
|
||||
static const int _SEHScopeKind = 0; \
|
||||
register int _SEH2State = 0; \
|
||||
register int _SEH2Handle = 0; \
|
||||
_SEHFrame_t _SEH2Frame; \
|
||||
_SEHTryLevel_t _SEH2TryLevel; \
|
||||
_SEHPortableFrame_t * const _SEHPortableFrame = \
|
||||
_SEH2TopTryLevel ? &_SEH2Frame.SEH_Header : _SEH2CurPortableFrame; \
|
||||
\
|
||||
(void)_SEHScopeKind; \
|
||||
(void)_SEHPortableFrame; \
|
||||
(void)_SEH2Handle; \
|
||||
\
|
||||
for(;;) \
|
||||
{ \
|
||||
_SEH_DECLARE_HANDLERS(_SEH2Filter, _SEH2Finally); \
|
||||
\
|
||||
_SEHFrame = _alloca(sizeof(_SEHFrame_t)); \
|
||||
_SEHFrame->SEH_Header.SPF_Handlers = &_SEHHandlers; \
|
||||
_SEHFrame->SEH_Locals = &_SEHLocals; \
|
||||
\
|
||||
_SEHPortableFrame = &_SEHFrame->SEH_Header; \
|
||||
(void)_SEHPortableFrame; \
|
||||
\
|
||||
if(_SEHSetJmp(_SEHFrame->SEH_JmpBuf)) \
|
||||
break; \
|
||||
\
|
||||
_SEHEnter(&_SEHFrame->SEH_Header);
|
||||
|
||||
#define _SEH2_EXCEPT(FILTER_) \
|
||||
_SEHLeave(&_SEHFrame->SEH_Header); \
|
||||
_SEH2State = _SEH2_STATE_DONE; \
|
||||
\
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
case _SEH2_STATE_INIT_EXCEPT: \
|
||||
{ \
|
||||
_SEH2Filter = (FILTER_); \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
case _SEH2_STATE_HANDLER: \
|
||||
{ \
|
||||
_SEHLeave(&_SEHFrame->SEH_Header);
|
||||
|
||||
#define _SEH2_FINALLY(FINALLY_) \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
case _SEH2_STATE_INIT_FINALLY: \
|
||||
{ \
|
||||
_SEH2Finally = (FINALLY_);
|
||||
|
||||
#define _SEH2_END \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
default: \
|
||||
{ \
|
||||
switch(_SEH2State) \
|
||||
if(_SEH2State) \
|
||||
{ \
|
||||
case _SEH2_STATE_INIT_EXCEPT: _SEH2Filter = NULL; break; \
|
||||
case _SEH2_STATE_INIT_FINALLY: _SEH2Finally = NULL; break; \
|
||||
case _SEH2_STATE_HANDLER: _SEHLeave(&_SEHFrame->SEH_Header); break; \
|
||||
for(;;) \
|
||||
{ \
|
||||
{
|
||||
|
||||
#define _SEH_EXCEPT(FILTER_) \
|
||||
} \
|
||||
\
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
_SEH2_ASSUME(_SEH2Handle == 0); \
|
||||
break; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_SEH_DECLARE_HANDLERS((FILTER_), 0); \
|
||||
\
|
||||
_SEH2TryLevel.ST_Header.SPT_Handlers = &_SEHHandlers; \
|
||||
\
|
||||
if(_SEH2TopTryLevel) \
|
||||
{ \
|
||||
if(&_SEHLocals != _SEHDummyLocals) \
|
||||
_SEH2Frame.SEH_Locals = &_SEHLocals; \
|
||||
\
|
||||
_SEH2Frame.SEH_Header.SPF_Handler = _SEHCompilerSpecificHandler; \
|
||||
_SEHEnterFrame(&_SEH2Frame.SEH_Header, &_SEH2TryLevel.ST_Header); \
|
||||
} \
|
||||
else \
|
||||
_SEHEnterTry(&_SEH2TryLevel.ST_Header); \
|
||||
\
|
||||
if((_SEH2Handle = _SEHSetJmp(_SEH2TryLevel.ST_JmpBuf)) == 0) \
|
||||
{ \
|
||||
_SEH2_ASSUMING(++ _SEH2State); \
|
||||
_SEH2_ASSUME(_SEH2State != 0); \
|
||||
continue; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
if(_SEHHandlers.SH_Finally) \
|
||||
_SEHHandlers.SH_Finally(&_SEHFrame->SEH_Header); \
|
||||
}
|
||||
_SEHLeave(); \
|
||||
\
|
||||
if(_SEH2Handle) \
|
||||
{
|
||||
|
||||
#define _SEH2_HANDLE _SEH2_EXCEPT(_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER))
|
||||
#define _SEH_FINALLY(FINALLY_) \
|
||||
} \
|
||||
\
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
_SEHLeave(); \
|
||||
break; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_SEH_DECLARE_HANDLERS(0, (FINALLY_)); \
|
||||
\
|
||||
_SEH2TryLevel.ST_Header.SPT_Handlers = &_SEHHandlers; \
|
||||
\
|
||||
if(_SEH2TopTryLevel) \
|
||||
{ \
|
||||
if(&_SEHLocals != _SEHDummyLocals) \
|
||||
_SEH2Frame.SEH_Locals = &_SEHLocals; \
|
||||
\
|
||||
_SEH2Frame.SEH_Header.SPF_Handler = 0; \
|
||||
_SEHEnterFrame(&_SEH2Frame.SEH_Header, &_SEH2TryLevel.ST_Header); \
|
||||
} \
|
||||
else \
|
||||
_SEHEnterTry(&_SEH2TryLevel.ST_Header); \
|
||||
\
|
||||
++ _SEH2State; \
|
||||
_SEH2_ASSUME(_SEH2State != 0); \
|
||||
continue; \
|
||||
} \
|
||||
\
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
(FINALLY_)(&_SEH2Frame.SEH_Header); \
|
||||
if(0) \
|
||||
{
|
||||
|
||||
#define _SEH2_GetExceptionCode _SEH_GetExceptionCode
|
||||
#define _SEH2_GetExceptionPointers _SEH_GetExceptionPointers
|
||||
#define _SEH2_AbnormalTermination _SEH_AbnormalTermination
|
||||
#define _SEH_END \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define _SEH_HANDLE _SEH_EXCEPT(_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER))
|
||||
|
||||
#define _SEH_GetExceptionCode _SEHX_GetExceptionCode
|
||||
#define _SEH_GetExceptionPointers _SEHX_GetExceptionPointers
|
||||
#define _SEH_AbnormalTermination _SEHX_AbnormalTermination
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ typedef struct __SEHRegistration
|
|||
_SEHRegistration_t;
|
||||
|
||||
struct __SEHPortableFrame;
|
||||
struct __SEHPortableTryLevel;
|
||||
|
||||
typedef long (__stdcall * _SEHFilter_t)
|
||||
(
|
||||
|
@ -52,7 +53,7 @@ typedef long (__stdcall * _SEHFilter_t)
|
|||
|
||||
typedef __declspec(noreturn) void (__stdcall * _SEHHandler_t)
|
||||
(
|
||||
struct __SEHPortableFrame *
|
||||
struct __SEHPortableTryLevel *
|
||||
);
|
||||
|
||||
typedef void (__stdcall * _SEHFinally_t)
|
||||
|
@ -63,22 +64,68 @@ typedef void (__stdcall * _SEHFinally_t)
|
|||
typedef struct __SEHHandlers
|
||||
{
|
||||
_SEHFilter_t SH_Filter;
|
||||
_SEHHandler_t SH_Handler;
|
||||
_SEHFinally_t SH_Finally;
|
||||
}
|
||||
_SEHHandlers_t;
|
||||
|
||||
typedef struct __SEHPortableTryLevel
|
||||
{
|
||||
struct __SEHPortableTryLevel * SPT_Next;
|
||||
const _SEHHandlers_t * SPT_Handlers;
|
||||
}
|
||||
_SEHPortableTryLevel_t;
|
||||
|
||||
typedef struct __SEHPortableFrame
|
||||
{
|
||||
_SEHRegistration_t SPF_Registration;
|
||||
unsigned long SPF_Code;
|
||||
int SPF_Handling;
|
||||
const _SEHHandlers_t * SPF_Handlers;
|
||||
_SEHHandler_t SPF_Handler;
|
||||
_SEHPortableTryLevel_t * SPF_TopTryLevel;
|
||||
}
|
||||
_SEHPortableFrame_t;
|
||||
|
||||
extern void __stdcall _SEHEnter(_SEHPortableFrame_t *);
|
||||
extern void __stdcall _SEHLeave(_SEHPortableFrame_t *);
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern void __stdcall _SEHEnterFrame_s
|
||||
(
|
||||
_SEHPortableFrame_t *,
|
||||
_SEHPortableTryLevel_t *
|
||||
);
|
||||
|
||||
extern void __stdcall _SEHEnterTry_s(_SEHPortableTryLevel_t *);
|
||||
extern void __stdcall _SEHLeave_s(void);
|
||||
|
||||
#if !defined(_SEH_NO_FASTCALL)
|
||||
# ifdef _M_IX86
|
||||
# define _SEH_FASTCALL __fastcall
|
||||
# else
|
||||
# define _SEH_FASTCALL __stdcall
|
||||
# endif
|
||||
|
||||
extern void _SEH_FASTCALL _SEHEnterFrame_f
|
||||
(
|
||||
_SEHPortableFrame_t *,
|
||||
_SEHPortableTryLevel_t *
|
||||
);
|
||||
|
||||
extern void _SEH_FASTCALL _SEHEnterTry_f(_SEHPortableTryLevel_t *);
|
||||
extern void _SEH_FASTCALL _SEHLeave_f(void);
|
||||
|
||||
# define _SEHEnterFrame _SEHEnterFrame_f
|
||||
# define _SEHEnterTry _SEHEnterTry_f
|
||||
# define _SEHLeave _SEHLeave_f
|
||||
#else
|
||||
# define _SEHEnterFrame _SEHEnterFrame_s
|
||||
# define _SEHEnterTry _SEHEnterTry_s
|
||||
# define _SEHLeave _SEHLeave_s
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ static __inline void _SEHCallFinally
|
|||
|
||||
/* FINALLY FUNCTIONS */
|
||||
/* Declares a finally function's prototype */
|
||||
#define _SEH_FINALLY(NAME_) \
|
||||
#define _SEH_FINALLYFUNC(NAME_) \
|
||||
void __stdcall NAME_ \
|
||||
( \
|
||||
int _SEHAbnormalTermination, \
|
||||
|
@ -123,13 +123,13 @@ static __inline void _SEHCallFinally
|
|||
_SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ())
|
||||
|
||||
#define _SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ARGS_) \
|
||||
static __inline _SEH_FINALLY(WRAPPER_) \
|
||||
static __inline _SEH_FINALLYFUNC(WRAPPER_) \
|
||||
{ \
|
||||
NAME_ ARGS_; \
|
||||
}
|
||||
|
||||
#define _SEH_WRAP_FINALLY_LOCALS_ARGS(WRAPPER_, LOCALS_, NAME_, ARGS_) \
|
||||
static __inline _SEH_FINALLY(WRAPPER_) \
|
||||
static __inline _SEH_FINALLYFUNC(WRAPPER_) \
|
||||
{ \
|
||||
_SEH_ACCESS_LOCALS(LOCALS_); \
|
||||
NAME_ ARGS_; \
|
||||
|
|
|
@ -36,10 +36,19 @@ typedef struct __SEHJmpBuf
|
|||
_SEHJmpBuf_t[1];
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern __declspec(noreturn) void __stdcall _SEHLongJmp(_SEHJmpBuf_t, int);
|
||||
extern __declspec(noreturn) void __stdcall _SEHLongJmp_KeepEsp(_SEHJmpBuf_t, int);
|
||||
extern int __stdcall _SEHSetJmp(_SEHJmpBuf_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -2259,7 +2259,7 @@ BOOL pe_load_debug_directory(const struct process* pcs, struct module* module,
|
|||
msc_dbg.nomap = 0;
|
||||
msc_dbg.omapp = NULL;
|
||||
|
||||
_SEH_TRY_FILTER(page_fault)
|
||||
_SEH_TRY
|
||||
{
|
||||
ret = FALSE;
|
||||
|
||||
|
@ -2324,7 +2324,7 @@ typedef struct _FPO_DATA
|
|||
#endif
|
||||
|
||||
}
|
||||
_SEH_HANDLE
|
||||
_SEH_EXCEPT(page_fault)
|
||||
{
|
||||
ERR("Got a page fault while loading symbols\n");
|
||||
ret = FALSE;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <limits.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -24,26 +24,62 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
#include <pseh.h>
|
||||
#include <pseh/framebased/internal.h>
|
||||
#include <pseh/excpt.h>
|
||||
#include <excpt.h>
|
||||
#include <pseh/framebased.h>
|
||||
|
||||
#include <excpt.h>
|
||||
|
||||
/* Assembly helpers, see i386/framebased.asm */
|
||||
extern void __cdecl _SEHCleanHandlerEnvironment(void);
|
||||
extern void __cdecl _SEHRegisterFrame(_SEHRegistration_t *);
|
||||
extern void __cdecl _SEHUnregisterFrame(const _SEHRegistration_t *);
|
||||
extern void __cdecl _SEHUnwind(_SEHPortableFrame_t *);
|
||||
extern struct __SEHRegistration * __cdecl _SEHRegisterFrame(_SEHRegistration_t *);
|
||||
extern void __cdecl _SEHUnregisterFrame(void);
|
||||
extern void __cdecl _SEHGlobalUnwind(_SEHPortableFrame_t *);
|
||||
extern _SEHRegistration_t * __cdecl _SEHCurrentRegistration(void);
|
||||
|
||||
/* Borland C++ uses a different decoration (i.e. none) for stdcall functions */
|
||||
extern void __stdcall RtlUnwind(void *, void *, void *, void *);
|
||||
void const * _SEHRtlUnwind = RtlUnwind;
|
||||
|
||||
__declspec(noreturn) void __cdecl _SEHCallHandler(_SEHPortableFrame_t * frame)
|
||||
void __stdcall _SEHLocalUnwind
|
||||
(
|
||||
_SEHPortableFrame_t * frame,
|
||||
_SEHPortableTryLevel_t * dsttrylevel
|
||||
)
|
||||
{
|
||||
frame->SPF_Handling = 1;
|
||||
_SEHUnwind(frame);
|
||||
frame->SPF_Handlers->SH_Handler(frame);
|
||||
_SEHPortableTryLevel_t * trylevel;
|
||||
|
||||
for
|
||||
(
|
||||
trylevel = frame->SPF_TopTryLevel;
|
||||
trylevel != dsttrylevel;
|
||||
trylevel = trylevel->SPT_Next
|
||||
)
|
||||
{
|
||||
_SEHFinally_t pfnFinally;
|
||||
|
||||
/* ASSERT(trylevel); */
|
||||
|
||||
pfnFinally = trylevel->SPT_Handlers->SH_Finally;
|
||||
|
||||
if(pfnFinally)
|
||||
pfnFinally(frame);
|
||||
}
|
||||
}
|
||||
|
||||
__declspec(noreturn) void __cdecl _SEHCallHandler
|
||||
(
|
||||
_SEHPortableFrame_t * frame,
|
||||
_SEHPortableTryLevel_t * trylevel
|
||||
)
|
||||
{
|
||||
DbgPrint("_SEHCallHandler: REG %p\n", _SEHCurrentRegistration());
|
||||
_SEHGlobalUnwind(frame);
|
||||
DbgPrint("_SEHCallHandler: REG %p\n", _SEHCurrentRegistration());
|
||||
_SEHLocalUnwind(frame, trylevel);
|
||||
DbgPrint("_SEHCallHandler: REG %p\n", _SEHCurrentRegistration());
|
||||
frame->SPF_Handler(trylevel);
|
||||
}
|
||||
|
||||
int __cdecl _SEHFrameHandler
|
||||
|
@ -62,73 +98,143 @@ int __cdecl _SEHFrameHandler
|
|||
|
||||
/* Unwinding */
|
||||
if(ExceptionRecord->ExceptionFlags & (4 | 2))
|
||||
{
|
||||
if(frame->SPF_Handlers->SH_Finally && !frame->SPF_Handling)
|
||||
frame->SPF_Handlers->SH_Finally(frame);
|
||||
}
|
||||
_SEHLocalUnwind(frame, NULL);
|
||||
/* Handling */
|
||||
else
|
||||
{
|
||||
int ret;
|
||||
_SEHPortableTryLevel_t * trylevel;
|
||||
|
||||
if(ExceptionRecord->ExceptionCode)
|
||||
frame->SPF_Code = ExceptionRecord->ExceptionCode;
|
||||
else
|
||||
frame->SPF_Code = 0xC0000001;
|
||||
frame->SPF_Code = 0xC0000001;
|
||||
|
||||
switch((UINT_PTR)frame->SPF_Handlers->SH_Filter)
|
||||
for
|
||||
(
|
||||
trylevel = frame->SPF_TopTryLevel;
|
||||
trylevel != NULL;
|
||||
trylevel = trylevel->SPT_Next
|
||||
)
|
||||
{
|
||||
case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER):
|
||||
case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_CONTINUE_SEARCH):
|
||||
case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_CONTINUE_EXECUTION):
|
||||
{
|
||||
ret = (int)((UINT_PTR)frame->SPF_Handlers->SH_Filter) - 2;
|
||||
break;
|
||||
}
|
||||
_SEHFilter_t pfnFilter = trylevel->SPT_Handlers->SH_Filter;
|
||||
|
||||
default:
|
||||
switch((UINT_PTR)pfnFilter)
|
||||
{
|
||||
if(frame->SPF_Handlers->SH_Filter)
|
||||
case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER):
|
||||
case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_CONTINUE_SEARCH):
|
||||
case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_CONTINUE_EXECUTION):
|
||||
{
|
||||
EXCEPTION_POINTERS ep;
|
||||
|
||||
ep.ExceptionRecord = ExceptionRecord;
|
||||
ep.ContextRecord = ContextRecord;
|
||||
|
||||
ret = frame->SPF_Handlers->SH_Filter(&ep, frame);
|
||||
ret = (int)((UINT_PTR)pfnFilter) - 2;
|
||||
break;
|
||||
}
|
||||
else
|
||||
ret = _SEH_CONTINUE_SEARCH;
|
||||
|
||||
break;
|
||||
default:
|
||||
{
|
||||
if(trylevel->SPT_Handlers->SH_Filter)
|
||||
{
|
||||
EXCEPTION_POINTERS ep;
|
||||
|
||||
ep.ExceptionRecord = ExceptionRecord;
|
||||
ep.ContextRecord = ContextRecord;
|
||||
|
||||
ret = pfnFilter(&ep, frame);
|
||||
}
|
||||
else
|
||||
ret = _SEH_CONTINUE_SEARCH;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* _SEH_CONTINUE_EXECUTION */
|
||||
if(ret < 0)
|
||||
return ExceptionContinueExecution;
|
||||
/* _SEH_EXECUTE_HANDLER */
|
||||
else if(ret > 0)
|
||||
_SEHCallHandler(frame, trylevel);
|
||||
/* _SEH_CONTINUE_SEARCH */
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
/* _SEH_CONTINUE_EXECUTION */
|
||||
if(ret < 0)
|
||||
return ExceptionContinueExecution;
|
||||
/* _SEH_EXECUTE_HANDLER */
|
||||
else if(ret > 0)
|
||||
_SEHCallHandler(frame);
|
||||
/* _SEH_CONTINUE_SEARCH */
|
||||
else
|
||||
/* fall through */;
|
||||
/* FALLTHROUGH */
|
||||
}
|
||||
|
||||
return ExceptionContinueSearch;
|
||||
}
|
||||
|
||||
void __stdcall _SEHEnter(_SEHPortableFrame_t * frame)
|
||||
void __stdcall _SEHEnterFrame_s
|
||||
(
|
||||
_SEHPortableFrame_t * frame,
|
||||
_SEHPortableTryLevel_t * trylevel
|
||||
)
|
||||
{
|
||||
_SEHEnterFrame_f(frame, trylevel);
|
||||
}
|
||||
|
||||
void __stdcall _SEHEnterTry_s(_SEHPortableTryLevel_t * trylevel)
|
||||
{
|
||||
_SEHEnterTry_f(trylevel);
|
||||
}
|
||||
|
||||
void __stdcall _SEHLeave_s(void)
|
||||
{
|
||||
_SEHLeave_f();
|
||||
}
|
||||
|
||||
void _SEH_FASTCALL _SEHEnterFrame_f
|
||||
(
|
||||
_SEHPortableFrame_t * frame,
|
||||
_SEHPortableTryLevel_t * trylevel
|
||||
)
|
||||
{
|
||||
/* ASSERT(frame); */
|
||||
/* ASSERT(trylevel); */
|
||||
frame->SPF_Registration.SER_Handler = _SEHFrameHandler;
|
||||
frame->SPF_Code = 0;
|
||||
frame->SPF_Handling = 0;
|
||||
frame->SPF_TopTryLevel = trylevel;
|
||||
trylevel->SPT_Next = NULL;
|
||||
_SEHRegisterFrame(&frame->SPF_Registration);
|
||||
}
|
||||
|
||||
void __stdcall _SEHLeave(_SEHPortableFrame_t * frame)
|
||||
void _SEH_FASTCALL _SEHEnterTry_f(_SEHPortableTryLevel_t * trylevel)
|
||||
{
|
||||
_SEHUnregisterFrame(&frame->SPF_Registration);
|
||||
_SEHPortableFrame_t * frame;
|
||||
|
||||
frame = _SEH_CONTAINING_RECORD
|
||||
(
|
||||
_SEHCurrentRegistration(),
|
||||
_SEHPortableFrame_t,
|
||||
SPF_Registration
|
||||
);
|
||||
|
||||
trylevel->SPT_Next = frame->SPF_TopTryLevel;
|
||||
frame->SPF_TopTryLevel = trylevel;
|
||||
}
|
||||
|
||||
void _SEH_FASTCALL _SEHLeave_f(void)
|
||||
{
|
||||
_SEHPortableFrame_t * frame;
|
||||
_SEHPortableTryLevel_t * trylevel;
|
||||
|
||||
frame = _SEH_CONTAINING_RECORD
|
||||
(
|
||||
_SEHCurrentRegistration(),
|
||||
_SEHPortableFrame_t,
|
||||
SPF_Registration
|
||||
);
|
||||
|
||||
/* ASSERT(frame); */
|
||||
|
||||
trylevel = frame->SPF_TopTryLevel;
|
||||
|
||||
/* ASSERT(trylevel); */
|
||||
|
||||
if(trylevel->SPT_Next)
|
||||
frame->SPF_TopTryLevel = trylevel->SPT_Next;
|
||||
else
|
||||
_SEHUnregisterFrame();
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; Copyright (c) 2004 KJK::Hyperion
|
||||
; Copyright (c) 2004/2005 KJK::Hyperion
|
||||
|
||||
; Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
; of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,11 @@ __SEHCleanHandlerEnvironment:
|
|||
cld
|
||||
ret
|
||||
|
||||
global __SEHCurrentRegistration
|
||||
__SEHCurrentRegistration:
|
||||
mov eax, [fs:0]
|
||||
ret
|
||||
|
||||
global __SEHRegisterFrame
|
||||
__SEHRegisterFrame:
|
||||
mov ecx, [esp+4]
|
||||
|
@ -35,33 +40,32 @@ __SEHRegisterFrame:
|
|||
|
||||
global __SEHUnregisterFrame
|
||||
__SEHUnregisterFrame:
|
||||
mov ecx, [esp+4]
|
||||
mov ecx, [ecx]
|
||||
mov ecx, [fs:0]
|
||||
mov ecx, [ecx+0]
|
||||
mov [fs:0], ecx
|
||||
ret
|
||||
|
||||
global __SEHUnwind
|
||||
__SEHUnwind:
|
||||
global __SEHGlobalUnwind
|
||||
__SEHGlobalUnwind:
|
||||
|
||||
extern __SEHRtlUnwind
|
||||
|
||||
mov ecx, [esp+4]
|
||||
|
||||
; RtlUnwind clobbers all the "don't clobber" registers, so we save them
|
||||
push ebx
|
||||
mov ebx, [esp+8]
|
||||
push esi
|
||||
push edi
|
||||
push ebx
|
||||
|
||||
xor eax, eax
|
||||
push eax ; ReturnValue
|
||||
push eax ; ExceptionRecord
|
||||
push eax ; TargetIp
|
||||
push ecx ; TargetFrame
|
||||
push 0x0 ; ReturnValue
|
||||
push 0x0 ; ExceptionRecord
|
||||
push .RestoreRegisters ; TargetIp
|
||||
push ebx ; TargetFrame
|
||||
call [__SEHRtlUnwind]
|
||||
|
||||
pop ebx
|
||||
.RestoreRegisters:
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
|
||||
ret
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; Copyright (c) 2004 KJK::Hyperion
|
||||
; Copyright (c) 2004/2005 KJK::Hyperion
|
||||
|
||||
; Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
; of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -78,7 +78,7 @@ ExRaiseException (PEXCEPTION_RECORD ExceptionRecord)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOLEAN
|
||||
LONG
|
||||
STDCALL
|
||||
ExSystemExceptionFilter(VOID)
|
||||
{
|
||||
|
|
|
@ -120,7 +120,7 @@ NtCreateEvent(OUT PHANDLE EventHandle,
|
|||
ProbeForWrite(EventHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -164,7 +164,7 @@ NtCreateEvent(OUT PHANDLE EventHandle,
|
|||
|
||||
*EventHandle = hEvent;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -200,7 +200,7 @@ NtOpenEvent(OUT PHANDLE EventHandle,
|
|||
ProbeForWrite(EventHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -225,7 +225,7 @@ NtOpenEvent(OUT PHANDLE EventHandle,
|
|||
|
||||
*EventHandle = hEvent;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -260,7 +260,7 @@ NtPulseEvent(IN HANDLE EventHandle,
|
|||
ProbeForWrite(PreviousState,
|
||||
sizeof(LONG),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -291,7 +291,7 @@ NtPulseEvent(IN HANDLE EventHandle,
|
|||
|
||||
*PreviousState = Prev;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -358,12 +358,12 @@ NtQueryEvent(IN HANDLE EventHandle,
|
|||
/* Return length */
|
||||
if(ReturnLength) *ReturnLength = sizeof(EVENT_BASIC_INFORMATION);
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
} _SEH_END;
|
||||
|
||||
|
||||
/* Dereference the Object */
|
||||
ObDereferenceObject(Event);
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ NtResetEvent(IN HANDLE EventHandle,
|
|||
ProbeForWrite(PreviousState,
|
||||
sizeof(LONG),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -427,7 +427,7 @@ NtResetEvent(IN HANDLE EventHandle,
|
|||
|
||||
*PreviousState = Prev;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -463,7 +463,7 @@ NtSetEvent(IN HANDLE EventHandle,
|
|||
ProbeForWrite(PreviousState,
|
||||
sizeof(LONG),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -494,7 +494,7 @@ NtSetEvent(IN HANDLE EventHandle,
|
|||
|
||||
*PreviousState = Prev;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ NtCreateEventPair(OUT PHANDLE EventPairHandle,
|
|||
ProbeForWrite(EventPairHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -123,7 +123,7 @@ NtCreateEventPair(OUT PHANDLE EventPairHandle,
|
|||
|
||||
*EventPairHandle = hEventPair;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -155,7 +155,7 @@ NtOpenEventPair(OUT PHANDLE EventPairHandle,
|
|||
ProbeForWrite(EventPairHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -180,7 +180,7 @@ NtOpenEventPair(OUT PHANDLE EventPairHandle,
|
|||
|
||||
*EventPairHandle = hEventPair;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ NtCreateMutant(OUT PHANDLE MutantHandle,
|
|||
ProbeForWrite(MutantHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -145,7 +145,7 @@ NtCreateMutant(OUT PHANDLE MutantHandle,
|
|||
|
||||
*MutantHandle = hMutant;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -181,7 +181,7 @@ NtOpenMutant(OUT PHANDLE MutantHandle,
|
|||
ProbeForWrite(MutantHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -206,7 +206,7 @@ NtOpenMutant(OUT PHANDLE MutantHandle,
|
|||
|
||||
*MutantHandle = hMutant;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -270,7 +270,7 @@ NtQueryMutant(IN HANDLE MutantHandle,
|
|||
/* Return the Result Length if requested */
|
||||
if(ResultLength) *ResultLength = sizeof(MUTANT_BASIC_INFORMATION);
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -313,7 +313,7 @@ NtReleaseMutant(IN HANDLE MutantHandle,
|
|||
ProbeForWrite(PreviousCount,
|
||||
sizeof(LONG),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -341,7 +341,7 @@ NtReleaseMutant(IN HANDLE MutantHandle,
|
|||
|
||||
Prev = KeReleaseMutant(Mutant, MUTANT_INCREMENT, FALSE, FALSE);
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -358,7 +358,7 @@ NtReleaseMutant(IN HANDLE MutantHandle,
|
|||
|
||||
*PreviousCount = Prev;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ NtCreateProfile(OUT PHANDLE ProfileHandle,
|
|||
ProbeForWrite(Buffer,
|
||||
BufferSize,
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
} _SEH_END;
|
||||
|
@ -219,7 +219,7 @@ NtCreateProfile(OUT PHANDLE ProfileHandle,
|
|||
|
||||
*ProfileHandle = hProfile;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
} _SEH_END;
|
||||
|
@ -249,7 +249,7 @@ NtQueryPerformanceCounter(OUT PLARGE_INTEGER PerformanceCounter,
|
|||
ProbeForWrite(PerformanceFrequency,
|
||||
sizeof(LARGE_INTEGER),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
} _SEH_END;
|
||||
|
@ -267,7 +267,7 @@ NtQueryPerformanceCounter(OUT PLARGE_INTEGER PerformanceCounter,
|
|||
|
||||
*PerformanceFrequency = PerfFrequency;
|
||||
}
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -420,7 +420,7 @@ NtQueryIntervalProfile(IN KPROFILE_SOURCE ProfileSource,
|
|||
sizeof(ULONG),
|
||||
sizeof(ULONG));
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
} _SEH_END;
|
||||
|
@ -436,7 +436,7 @@ NtQueryIntervalProfile(IN KPROFILE_SOURCE ProfileSource,
|
|||
|
||||
*Interval = ReturnInterval;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ NtCreateSemaphore(OUT PHANDLE SemaphoreHandle,
|
|||
ProbeForWrite(SemaphoreHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -136,7 +136,7 @@ NtCreateSemaphore(OUT PHANDLE SemaphoreHandle,
|
|||
|
||||
*SemaphoreHandle = hSemaphore;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -171,7 +171,7 @@ NtOpenSemaphore(OUT PHANDLE SemaphoreHandle,
|
|||
ProbeForWrite(SemaphoreHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -196,7 +196,7 @@ NtOpenSemaphore(OUT PHANDLE SemaphoreHandle,
|
|||
|
||||
*SemaphoreHandle = hSemaphore;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -261,7 +261,7 @@ NtQuerySemaphore(IN HANDLE SemaphoreHandle,
|
|||
/* Return length */
|
||||
if(ReturnLength) *ReturnLength = sizeof(SEMAPHORE_BASIC_INFORMATION);
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -298,7 +298,7 @@ NtReleaseSemaphore(IN HANDLE SemaphoreHandle,
|
|||
ProbeForWrite(PreviousCount,
|
||||
sizeof(LONG),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -339,7 +339,7 @@ NtReleaseSemaphore(IN HANDLE SemaphoreHandle,
|
|||
|
||||
*PreviousCount = PrevCount;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
|||
sizeof(ULONG));
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
_SEH_EXCEPT(_SEH_ExSystemExceptionFilter)
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
|||
RtlInitAnsiString(&AValue, Value);
|
||||
Status = RtlAnsiStringToUnicodeString(&WValue, &AValue, TRUE);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
_SEH_EXCEPT(_SEH_ExSystemExceptionFilter)
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
|||
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
_SEH_EXCEPT(_SEH_ExSystemExceptionFilter)
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
|
@ -740,7 +740,7 @@ QSI_DEF(SystemProcessorPerformanceInformation)
|
|||
|
||||
*ReqSize = KeNumberProcessors * sizeof (SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION);
|
||||
/*
|
||||
* Check user buffer's size
|
||||
* Check user buffer's size
|
||||
*/
|
||||
if (Size < KeNumberProcessors * sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION))
|
||||
{
|
||||
|
@ -760,7 +760,7 @@ QSI_DEF(SystemProcessorPerformanceInformation)
|
|||
Spi++;
|
||||
Prcb = (PKPRCB)((ULONG_PTR)Prcb + PAGE_SIZE);
|
||||
}
|
||||
|
||||
|
||||
return (STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ NtSetSystemTime(IN PLARGE_INTEGER SystemTime,
|
|||
sizeof(ULONG));
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
_SEH_EXCEPT(_SEH_ExSystemExceptionFilter)
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ NtSetSystemTime(IN PLARGE_INTEGER SystemTime,
|
|||
{
|
||||
*PreviousTime = OldSystemTime;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
_SEH_EXCEPT(_SEH_ExSystemExceptionFilter)
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ NtQuerySystemTime(OUT PLARGE_INTEGER SystemTime)
|
|||
can happen! */
|
||||
KeQuerySystemTime(SystemTime);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
_SEH_EXCEPT(_SEH_ExSystemExceptionFilter)
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
|
|
|
@ -66,17 +66,17 @@ ExTimerRundown(VOID)
|
|||
/* Lock the Thread's Active Timer List*/
|
||||
KeAcquireSpinLock(&Thread->ActiveTimerListLock, &OldIrql);
|
||||
|
||||
while (!IsListEmpty(&Thread->ActiveTimerListHead))
|
||||
{
|
||||
while (!IsListEmpty(&Thread->ActiveTimerListHead))
|
||||
{
|
||||
|
||||
/* Remove a Timer */
|
||||
CurrentEntry = RemoveTailList(&Thread->ActiveTimerListHead);
|
||||
|
||||
|
||||
/* Get the Timer */
|
||||
Timer = CONTAINING_RECORD(CurrentEntry, ETIMER, ActiveTimerListEntry);
|
||||
|
||||
Timer = CONTAINING_RECORD(CurrentEntry, ETIMER, ActiveTimerListEntry);
|
||||
|
||||
ASSERT (Timer->ApcAssociated);
|
||||
Timer->ApcAssociated = FALSE;
|
||||
Timer->ApcAssociated = FALSE;
|
||||
|
||||
DPRINT("Timer, ThreadList: %x, %x\n", Timer, Thread);
|
||||
|
||||
|
@ -86,7 +86,7 @@ ExTimerRundown(VOID)
|
|||
/* Lock the Timer */
|
||||
KeAcquireSpinLockAtDpcLevel(&Timer->Lock);
|
||||
|
||||
ASSERT (&Thread->Tcb == Timer->TimerApc.Thread);
|
||||
ASSERT (&Thread->Tcb == Timer->TimerApc.Thread);
|
||||
|
||||
KeCancelTimer(&Timer->KeTimer);
|
||||
KeRemoveQueueDpc(&Timer->TimerDpc);
|
||||
|
@ -278,7 +278,7 @@ NtCancelTimer(IN HANDLE TimerHandle,
|
|||
ProbeForWrite(CurrentState,
|
||||
sizeof(BOOLEAN),
|
||||
sizeof(BOOLEAN));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
Status = _SEH_GetExceptionCode();
|
||||
} _SEH_END;
|
||||
|
||||
|
@ -356,7 +356,7 @@ NtCancelTimer(IN HANDLE TimerHandle,
|
|||
|
||||
*CurrentState = State;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -392,7 +392,7 @@ NtCreateTimer(OUT PHANDLE TimerHandle,
|
|||
ProbeForWrite(TimerHandle,
|
||||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -444,7 +444,7 @@ NtCreateTimer(OUT PHANDLE TimerHandle,
|
|||
|
||||
*TimerHandle = hTimer;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -478,7 +478,7 @@ NtOpenTimer(OUT PHANDLE TimerHandle,
|
|||
sizeof(HANDLE),
|
||||
sizeof(ULONG));
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -504,7 +504,7 @@ NtOpenTimer(OUT PHANDLE TimerHandle,
|
|||
|
||||
*TimerHandle = hTimer;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -567,7 +567,7 @@ NtQueryTimer(IN HANDLE TimerHandle,
|
|||
|
||||
if(ReturnLength != NULL) *ReturnLength = sizeof(TIMER_BASIC_INFORMATION);
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -621,7 +621,7 @@ NtSetTimer(IN HANDLE TimerHandle,
|
|||
sizeof(BOOLEAN));
|
||||
}
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
@ -745,7 +745,7 @@ NtSetTimer(IN HANDLE TimerHandle,
|
|||
|
||||
*PreviousState = State;
|
||||
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) {
|
||||
|
||||
Status = _SEH_GetExceptionCode();
|
||||
|
||||
|
|
|
@ -172,6 +172,17 @@ ExChangeHandle(IN PHANDLE_TABLE HandleTable,
|
|||
IN PEX_CHANGE_HANDLE_CALLBACK ChangeHandleCallback,
|
||||
IN PVOID Context);
|
||||
|
||||
/* PSEH EXCEPTION HANDLING **************************************************/
|
||||
|
||||
LONG
|
||||
STDCALL
|
||||
ExSystemExceptionFilter(VOID);
|
||||
|
||||
static __inline _SEH_FILTER(_SEH_ExSystemExceptionFilter)
|
||||
{
|
||||
return ExSystemExceptionFilter();
|
||||
}
|
||||
|
||||
/* OTHER FUNCTIONS **********************************************************/
|
||||
|
||||
LONGLONG
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <wchar.h>
|
||||
#include <roskrnl.h>
|
||||
#include <ntos/minmax.h>
|
||||
|
@ -29,6 +30,7 @@
|
|||
#include <ddk/pnpfuncs.h>
|
||||
#include <ddk/wdmguid.h>
|
||||
#include <ntdll/ldr.h>
|
||||
#include <pseh.h>
|
||||
#include <internal/ctype.h>
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/ke.h>
|
||||
|
@ -66,8 +68,6 @@
|
|||
#include <napi/teb.h>
|
||||
#include <napi/win32.h>
|
||||
|
||||
#include <pseh.h>
|
||||
|
||||
#ifndef RTL_CONSTANT_STRING
|
||||
#define RTL_CONSTANT_STRING(__SOURCE_STRING__) \
|
||||
{ \
|
||||
|
|
|
@ -71,8 +71,8 @@ _KiTrapRet:
|
|||
/* Restore the old exception handler list */
|
||||
popl %ebx
|
||||
movl %ebx, %fs:KPCR_EXCEPTION_LIST
|
||||
|
||||
popl %fs
|
||||
|
||||
popl %fs
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
|
|
|
@ -211,10 +211,10 @@ ExAllocatePoolWithQuotaTag (IN POOL_TYPE PoolType,
|
|||
/* Couldn't charge, so free the pool and let the caller SEH manage */
|
||||
ExFreePool(Block);
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
} _SEH_TRY_FILTER(FreeAndGoOn) {
|
||||
} _SEH_TRY {
|
||||
//* FIXME: Is there a way to get the actual Pool size allocated from the pool header? */
|
||||
PsChargePoolQuota(Process, PoolType, NumberOfBytes);
|
||||
} _SEH_HANDLE {
|
||||
} _SEH_EXCEPT(FreeAndGoOn) {
|
||||
/* Quota Exceeded and the caller had no SEH! */
|
||||
KeBugCheck(STATUS_QUOTA_EXCEEDED);
|
||||
} _SEH_END;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#define __WIN32K__
|
||||
#define NTOS_MODE_KERNEL
|
||||
|
||||
#include <malloc.h>
|
||||
#include <pseh.h>
|
||||
|
||||
#include <roscfg.h>
|
||||
#include <roskrnl.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue