问题描述
在哪里可以找到有关默认情况下如何处理SEH异常的信息? MSDN中没有此类信息.但是我需要这些信息来了解必须忽略哪些异常,然后使用EXCEPTION_CONTINUE_SEARCH将它们传递给系统.我的意思是处理了哪些SEH例外 默认情况下使用EXCEPTION_CONTINUE_EXECUTION,这就是为什么我的应用程序不终止并继续执行的原因?这就是为什么我不能在__except过滤器中使用EXCEPTION_EXECUTE_HANDLER处理它们的原因.
Where can I find information how SEH exceptions are processing by default? There is no such info in MSDN. But I need this information to know what exceptions I must ignore and pass them to system with EXCEPTION_CONTINUE_SEARCH. I mean what SEH exceptions are processed by default with EXCEPTION_CONTINUE_EXECUTION and that's why my application don't terminated and continue execution? That's why I must not processing them with EXCEPTION_EXECUTE_HANDLER in the __except filter.
这些都来自WinBase.h:
These are all from WinBase.h:
#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
#define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
#define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
#define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
#define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
#define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
#define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
#define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
#define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
#define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
#define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
#define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
#define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
#define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
#define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
#define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
#define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
#define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
#define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
#define EXCEPTION_POSSIBLE_DEADLOCK STATUS_POSSIBLE_DEADLOCK
推荐答案
您最好的选择是默认情况下忽略异常,但仅处理特定列表,这是所有示例向您展示如何做到的方式.那是
Your better bet is to ignore exceptions by default but only handle a certain list, and it is the way all samples show you how to do it. That is
__except(GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH )
这篇关于SEH例外.默认情况下,使用EXCEPTION_CONTINUE_EXECUTION处理哪些SEH异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!