网站首页  词典首页

请输入您要查询的函数:

 

术语 setunhandledexceptionfilter
释义 SetUnhandledExceptionFilter
语法:
C++
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(
__in LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter
);
SetUnhandledExceptionFilter函数
使应用程序可以取代高层的每一个进程线程异常处理程序。
在调用此函数,如果在一个异常没有被调试过程中发生,并使得异常的未处理的异常过滤器,该过滤器将调用异常筛选器功能的lpTopLevelExceptionFilter参数指定。
参数
lpTopLevelExceptionFilter [in]
一个顶层异常过滤函数将调用每当UnhandledExceptionFilter中函数指针得到控制,这一进程不被调试。阿为NULL这个参数的值在UnhandledExceptionFilter中指定的默认处理。
该过滤器函数的语法类似UnhandledExceptionFilter中说:这需要一个类型LPEXCEPTION_POINTERS一个参数,有一个WINAPI调用约定,并返回long类型的值。过滤器函数应该返回下列值之一。
ValueMeaning
EXCEPTION_EXECUTE_HANDLER
0x1Return从UnhandledExceptionFilter中并执行相关的异常处理程序。在进程终止这通常的结果。
EXCEPTION_CONTINUE_EXECUTION
0xffffffffReturn从UnhandledExceptionFilter中,继续执行从异常点。请注意,过滤功能可以随意修改,修改了异常信息通过其LPEXCEPTION_POINTERS参数提供延续的状态。
EXCEPTION_CONTINUE_SEARCH
0x0Proceed与UnhandledExceptionFilter中正常执行。这意味着服从SetErrorMode旗,或调用应用程序错误弹出消息框。
返回值
该SetUnhandledExceptionFilter函数返回前例外,建立过滤器的功能处理。阿空返回值的意思是指目前没有顶层异常处理程序。
备注
发行SetUnhandledExceptionFilter取代现有的顶级所有现有和未来所有调用进程的线程级异常筛选器。
异常处理程序规定由lpTopLevelExceptionFilter中执行的线程导致错误情况。这可能会影响异常处理程序的能力,恢复若干例外情况,如无效的堆栈。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
结构化异常处理函数
结构化异常处理概述
UnhandledExceptionFilter中
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==SetUnhandledExceptionFilter Function
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 the lpTopLevelExceptionFilter parameter.
Syntax
C++
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 the UnhandledExceptionFilter function gets control, and the process is not being debugged. A value of NULL for this parameter specifies default handling within UnhandledExceptionFilter.
The filter function has syntax similar to that of UnhandledExceptionFilter: It takes a single parameter of type LPEXCEPTION_POINTERS, has a WINAPI calling convention, and returns a value of type LONG. The filter function should return one of the following values.
ValueMeaning
EXCEPTION_EXECUTE_HANDLER
0x1Return from UnhandledExceptionFilter and execute the associated exception handler. This usually results in process termination.
EXCEPTION_CONTINUE_EXECUTION
0xffffffffReturn 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 its LPEXCEPTION_POINTERS parameter.
EXCEPTION_CONTINUE_SEARCH
0x0Proceed 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. A NULL 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.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Structured Exception Handling Functions
Structured Exception Handling Overview
UnhandledExceptionFilter
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms680634(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:27:40