网站首页  词典首页

请输入您要查询的函数:

 

术语 abnormaltermination
释义 AbnormalTermination
语法:
C++
BOOL AbnormalTermination(void);
AbnormalTermination宏
指示是否终止处理__try块正常终止。该函数可以调用只能从内部__finally块终止处理程序。
注意:微软的C / C + +优化编译器解释作为关键字这项功能,其境外使用适当的异常处理的语法生成一个编译器错误。
参数
此宏没有参数。
返回值
如果__try块异常终止,则返回值为非零。
如果__try块正常终止,返回值是零。
备注
在__try块终止通常只有当执行离开之后按顺序执行,在最后一个语句块的块。语句(如返回,跳转,继续或中断)造成执行离场块异常终止__try块的结果。在这种情况下,即使这种说法是在__try块的最后声明。
一个__try块异常终止会导致系统搜索通过所有堆栈帧,以决定是否终止处理程序必须调用落后。这可能导致数百个指令的执行,因此,重要的是要避免一个__try块,由于回报,跳转,继续或break语句异常终止。请注意,这些陈述不产生异常,即使异常终止。
为了避免非正常终止,应继续执行块的结束。您也可以执行__leave语句。该__leave语句允许没有造成异常终止,其性能损失为__try块立即终止。检查您的编译器文档,以确定是否__leave语句的支持。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
参见
结构化异常处理函数
结构化异常处理概述
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==AbnormalTermination Macro
Indicates whether the __try block of a termination handler terminated normally. The function can be called only from within the __finally block of a termination handler.
Note The Microsoft C/C++ Optimizing Compiler interprets this function as a keyword, and its use outside the appropriate exception-handling syntax generates a compiler error.
Syntax
C++
BOOL AbnormalTermination(void);
Parameters
This macro has no parameters.
Return Value
If the __try block terminated abnormally, the return value is nonzero.
If the __try block terminated normally, the return value is zero.
Remarks
The __try block terminates normally only if execution leaves the block sequentially after executing the last statement in the block. Statements (such as return, goto, continue, or break) that cause execution to leave the __try block result in abnormal termination of the block. This is the case even if such a statement is the last statement in the __try block.
Abnormal termination of a __try block causes the system to search backward through all stack frames to determine whether any termination handlers must be called. This can result in the execution of hundreds of instructions, so it is important to avoid abnormal termination of a __try block due to a return, goto, continue, or break statement. Note that these statements do not generate an exception, even though the termination is abnormal.
To avoid abnormal termination, execution should continue to the end of the block. You can also execute the __leave statement. The __leave statement allows for immediate termination of the __try block without causing abnormal termination and its performance penalty. Check your compiler documentation to determine if the __leave statement is supported.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
See Also
Structured Exception Handling Functions
Structured Exception Handling Overview
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms679265(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:23:01