网站首页  词典首页

请输入您要查询的函数:

 

术语 raiseexception
释义 RaiseException
语法:
C++
void WINAPI RaiseException(
__in DWORD dwExceptionCode,
__in DWORD dwExceptionFlags,
__in DWORD nNumberOfArguments,
__in const ULONG_PTR *lpArguments
);
RaiseException函数
提出了一个在调用线程例外。
参数
dwExceptionCode [in]
一个应用程序定义的异常的异常代码被提出。过滤器的表达和异常处理程序的异常处理程序块可以使用GetExceptionCode函数来检索此值。
请注意,系统会显示一个明确的消息之前,此位是保留的例外位,由自己的目的系统使用28位dwExceptionCode。
dwExceptionFlags [in]
唯一的例外标志。这可以是零,表示一种可持续例外,或EXCEPTION_NONCONTINUABLE来表示一个不可持续例外。任何企图后继续执行不可持续异常导致EXCEPTION_NONCONTINUABLE_EXCEPTION异常。
nNumberOfArguments [in]
在该lpArguments数组参数的个数。此值不得超过EXCEPTION_MAXIMUM_PARAMETERS。此参数被忽略,如果lpArguments为NULL。
lpArguments [in]
一个数组参数。此参数可以为NULL。这些参数可以包含任何应用程序定义需要被传递给异常处理程序筛选表达数据。
返回值
这个函数没有返回值。
备注
该RaiseException功能使一个过程,使用结构化异常处理处理私人的,软件生成的应用程序定义的异常。
引发异常导致异常调度员必须经过一个异常处理程序以下搜索:
该系统首先尝试通知进程的调试器,如果有的话。
如果进程不被调试,或者相关的调试器不处理异常时,系统尝试定位框架,通过搜索的堆栈线程发生异常的异常处理框架。该系统搜索当前堆栈帧第一,通过前面的收益落后的堆栈帧然后。
如果没有基于帧的处理程序可以找到,或者没有基于帧的处理程序处理该异常,该系统使第二次尝试,通知进程的调试器。
如果进程不被调试,或者相关的调试器不处理异常,该系统提供的默认处理的异常类型为基础。对于大多数例外,默认操作是调用ExitProcess函数。
在dwExceptionCode,dwExceptionFlags,nNumberOfArguments指定的值,lpArguments参数可以挽回一帧过滤器表达式的例外通过调用GetExceptionInformation函数处理。调试程序可以通过调用函数的WaitForDebugEvent这些值。
实例
有关示例,请参阅使用异常处理程序。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
PRB:ExitProcess期间
GetExceptionCode
GetExceptionInformation
结构化异常处理函数
结构化异常处理概述
WaitForDebugEvent
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==RaiseException Function
Raises an exception in the calling thread.
Syntax
C++
void WINAPI RaiseException(
__in DWORD dwExceptionCode,
__in DWORD dwExceptionFlags,
__in DWORD nNumberOfArguments,
__in const ULONG_PTR *lpArguments
);
Parameters
dwExceptionCode [in]
An application-defined exception code of the exception being raised. The filter expression and exception-handler block of an exception handler can use the GetExceptionCode function to retrieve this value.
Note that the system will clear bit 28 of dwExceptionCode before displaying a message This bit is a reserved exception bit, used by the system for its own purposes.
dwExceptionFlags [in]
The exception flags. This can be either zero to indicate a continuable exception, or EXCEPTION_NONCONTINUABLE to indicate a noncontinuable exception. Any attempt to continue execution after a noncontinuable exception causes the EXCEPTION_NONCONTINUABLE_EXCEPTION exception.
nNumberOfArguments [in]
The number of arguments in the lpArguments array. This value must not exceed EXCEPTION_MAXIMUM_PARAMETERS. This parameter is ignored if lpArguments is NULL.
lpArguments [in]
An array of arguments. This parameter can be NULL. These arguments can contain any application-defined data that needs to be passed to the filter expression of the exception handler.
Return Value
This function does not return a value.
Remarks
The RaiseException function enables a process to use structured exception handling to handle private, software-generated, application-defined exceptions.
Raising an exception causes the exception dispatcher to go through the following search for an exception handler:
The system first attempts to notify the process's debugger, if any.
If the process is not being debugged, or if the associated debugger does not handle the exception, the system attempts to locate a frame-based exception handler by searching the stack frames of the thread in which the exception occurred. The system searches the current stack frame first, then proceeds backward through preceding stack frames.
If no frame-based handler can be found, or no frame-based handler handles the exception, the system makes a second attempt to notify the process's debugger.
If the process is not being debugged, or if the associated debugger does not handle the exception, the system provides default handling based on the exception type. For most exceptions, the default action is to call the ExitProcess function.
The values specified in the dwExceptionCode, dwExceptionFlags, nNumberOfArguments, and lpArguments parameters can be retrieved in the filter expression of a frame-based exception handler by calling the GetExceptionInformation function. A debugger can retrieve these values by calling the WaitForDebugEvent function.
Examples
For an example, see Using an Exception Handler .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
ExitProcess
GetExceptionCode
GetExceptionInformation
Structured Exception Handling Functions
Structured Exception Handling Overview
WaitForDebugEvent
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms680552(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:24:56