SetUnhandledExceptionFilter function
来源:互联网 发布:社工库数据库共享平台 编辑:程序博客网 时间:2024/05/16 03:16
Enables an application to supersede the top-level exception handler of each thread of a process.允许应用程序继承进程中每一个线程的顶层异常处理程序。
After calling this function, if an exception occurs in a process that is not being debugged, and the exception makes it to the unhandled exception filter, that filter will call the exception filter function specified by thelpTopLevelExceptionFilter parameter.调用这个函数之后,如果一个异常发生在为被调试的进程中,那么这个异常会引起异常处理程序的调用,也就是说过滤器会调用thelpTopLevelExceptionFilter参数指定的异常处理程序。
Syntax
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter( _In_ LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
Parameters
- lpTopLevelExceptionFilter [in]
A pointer to a top-level exception filter function that will be called whenever theUnhandledExceptionFilter function gets control, and the process is not being debugged.指向顶层异常过滤处理函数的指针, A value ofNULL for this parameter specifies default handling withinUnhandledExceptionFilter.
The filter function has syntax similar to that of UnhandledExceptionFilter: It takes a single parameter of typeLPEXCEPTION_POINTERS, has a WINAPI calling convention, and returns a value of typeLONG. The filter function should return one of the following values.
Value Meaning - EXCEPTION_EXECUTE_HANDLER
- 0x1
Return from UnhandledExceptionFilter and execute the associated exception handler. This usually results in process termination.
- EXCEPTION_CONTINUE_EXECUTION
- 0xffffffff
Return from UnhandledExceptionFilter and continue execution from the point of the exception. Note that the filter function is free to modify the continuation state by modifying the exception information supplied through itsLPEXCEPTION_POINTERS parameter.
- EXCEPTION_CONTINUE_SEARCH
- 0x0
Proceed with normal execution of UnhandledExceptionFilter. That means obeying the SetErrorMode flags, or invoking the Application Error pop-up message box.
Return value
The SetUnhandledExceptionFilter function returns the address of the previous exception filter established with the function. ANULL return value means that there is no current top-level exception handler.
Remarks
Issuing SetUnhandledExceptionFilter replaces the existing top-level exception filter for all existing and all future threads in the calling process.
The exception handler specified by lpTopLevelExceptionFilter is executed in the context of the thread that caused the fault. This can affect the exception handler's ability to recover from certain exceptions, such as an invalid stack.
- SetUnhandledExceptionFilter function
- SetUnhandledExceptionFilter
- SetUnhandledExceptionFilter
- SetUnhandledExceptionFilter
- SetUnhandledExceptionFilter
- SetUnhandledExceptionFilter
- SetUnhandledExceptionFilter使用
- disable setunhandledexceptionfilter
- SetUnhandledExceptionFilter + StackWalker
- SetUnhandledExceptionFilter 的讨论
- SetUnhandledExceptionFilter和VS2005
- SetUnhandledExceptionFilter函数学习
- SetUnhandledExceptionFilter拦不住的崩溃
- SetUnhandledExceptionFilter函数学习
- SetUnhandledExceptionFilter函数学习
- VS2005中SetUnhandledExceptionFilter函数应用
- VS2005中SetUnhandledExceptionFilter函数应用
- VS2005中SetUnhandledExceptionFilter函数应用
- java nio学习记录1
- 配置官网peerDroid实例
- 对BMAPtoAVI使用总结
- sql导出数据并生成excel报告
- HTML特殊符号对照表
- SetUnhandledExceptionFilter function
- 小白IOS开发日记-UITableView篇(一)
- 三十五个非主流开源数据库 MongoDB领衔主演
- Thinking in BigData(六)大数据技术核心之ETL
- (转)职场警示:20不努力,30做助理
- FFMPEG + SDL音频播放分析
- Java 6 JVM参数选项大全(中文版)
- 球面距离 UVA 11817 Tunnelling the Earth
- synchronuized详解