大网数据广告活动
性能与资源

GetExceptionInformation macro

· 52CE 我爱测

Retrieves a computer-independent description of an exception, and information about the computer state that exists for the thread when the exception occurs. This function can be called only from within the filter expression of an exception handler.

Retrieves a computer-independent description of an exception, and information about the computer state that exists for the thread when the exception occurs. This function can be called only from within the filter expression of an exception 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

LPEXCEPTION_POINTERS GetExceptionInformation(void);

Parameters

This macro has no parameters.

Return value

A pointer to an EXCEPTION_POINTERS structure that contains pointers to the following two structures:

  • EXCEPTION_RECORD structure that contains a description of the exception.
  • CONTEXT structure that contains the computer state information.

Remarks

The filter expression (from which the function is called) is evaluated if an exception occurs during execution of the __try block, and it determines whether or not the __except block is executed.

The filter expression can invoke a filter function. The filter function cannot call GetExceptionInformation. However, the return value of GetExceptionInformation can be passed as a parameter to a filter function.

To pass the EXCEPTION_POINTERS information to the exception-handler block, the filter expression or filter function must copy the pointer or the data to safe storage that the handler can later access.

In the case of nested handlers, each filter expression is evaluated until one is evaluated as EXCEPTION_EXECUTE_HANDLER or EXCEPTION_CONTINUE_EXECUTION. Each filter expression can invoke GetExceptionInformation to get exception information.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]

See also

CONTEXT

EXCEPTION_POINTERS

EXCEPTION_RECORD

GetExceptionCode

GetXStateFeaturesMask

Structured Exception Handling Functions

Structured Exception Handling Overview

Enable Windows Support for Intel AVX

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 07/14/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。