다음을 통해 공유


GetExceptionInformation (Windows CE 5.0)

Send Feedback

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.

GetExceptionInformation can be called only from within the filter expression of a try-except exception handler.

LPEXCEPTION_POINTERSGetExceptionInformation(void);

Parameters

None.

Return Values

Indicates success when a pointer to an EXCEPTION_POINTERS structure that contains pointers to two other structures is returned.

The pointers to two other structures are an EXCEPTION_RECORD structure containing a description of the exception and a CONTEXT structure containing the machine-state information.

Remarks

The Excpt.h file must be explicitly included to use GetExceptionInformation.

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 the except block is executed.

The following code example shows the structure of a try-except statement.

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 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 try-except statements, each statement's 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.

Exceptions that occur across PSL boundaries should behave just like exceptions across functions in the same process, with the exception that the exception can not be continued with EXCEPTION_CONTINUE_EXECUTION.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Excpt.h.
Link Library: Coredll.lib.

See Also

EXCEPTION_POINTERS | EXCEPTION_RECORD | GetExceptionCode

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.