Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function retrieves a machine-independent description of an exception, and information about the machine state that existed for the thread when the exception occurred. GetExceptionInformationcan be called only from within the filter expression of a try- exceptexception handler.
LPEXCEPTION_POINTERS GetExceptionInformation(void);
Return Values
A pointer to an EXCEPTION_POINTERSstructure that contains pointers to two other structures—an EXCEPTION_RECORDstructure containing a description of the exception, and a CONTEXTstructure containing the machine-state information—indicates success.
Remarks
The Excpt.h file must be explicitly included in order to use GetExceptionInformation.
The filter expression (from which the function is called) is evaluated if an exception occurs during execution of the tryblock, and it determines whether the exceptblock is executed.
The following code example shows the structure of a try- exceptstatement.
try { // try block } except ( FilterFunction(GetExceptionInformation() ) { // exception handler block }
The filter expression can invoke a filter function. The filter function cannot call GetExceptionInformation. However, the return value of GetExceptionInformationcan be passed as a parameter to a filter function.
To pass the EXCEPTION_POINTERSinformation 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 try- exceptstatements, each statement's filter expression is evaluated until one is evaluated as EXCEPTION_EXECUTE_HANDLER or EXCEPTION_CONTINUE_EXECUTION. Each filter expression can invoke GetExceptionInformationto get exception information.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Excpt.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
EXCEPTION_POINTERS, EXCEPTION_RECORD, GetExceptionCode