RtlUnwindEx function
Applies to: desktop apps | Metro style apps
Initiates an unwind of procedure call frames.
Syntax
void WINAPI RtlUnwindEx( __in_opt FRAME_POINTERS TargetFrame, __in_opt PVOID TargetIp, __in_opt PEXCEPTION_RECORD ExceptionRecord, __in PVOID ReturnValue, __in PCONTEXT OriginalContext, __in_opt PUNWIND_HISTORY_TABLE HistoryTable );
Parameters
- TargetFrame [in, optional]
-
A pointer to the call frame that is the target of the unwind. If this parameter is NULL, the function performs an exit unwind.
- TargetIp [in, optional]
-
The continuation address of the unwind. This parameter is ignored if TargetFrame is NULL.
- ExceptionRecord [in, optional]
-
A pointer to an EXCEPTION_RECORD structure.
- ReturnValue [in]
-
A value to be placed in the integer function return register before continuing execution.
- OriginalContext [in]
-
A pointer to a CONTEXT structure that stores context during the unwind operation.
- HistoryTable [in, optional]
-
A pointer to the unwind history table. This structure is processor specific. For definitions of this structure, see Winternl.h.
Return value
This function does not return a value.
Remarks
The FRAME_POINTERS structure is defined as follows:
typedef struct _FRAME_POINTERS {
ULONGLONG MemoryStackFp;
ULONGLONG BackingStoreFp;
} FRAME_POINTERS, *PFRAME_POINTERS;
Requirements
|
Product | Windows XP Professional x64 Edition or 64-bit editions of Windows Server 2003 |
|---|---|
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012
__in_opt FRAME_POINTERS TargetFrame,
__in_opt PVOID TargetIp,
__in_opt PEXCEPTION_RECORD ExceptionRecord,
__in PVOID ReturnValue,
__in PCONTEXT OriginalContext,
__in_opt PUNWIND_HISTORY_TABLE HistoryTable
);
- 4/30/2012
- izzy sablan
The entire CONTEXT record must either be initialized to zero, or it must reflect the unwind context. Failure to do this will generally result in access violations.
The function prototype listed above applies only to IA64. Refer to WINNT.H for the correct prototype for AMD64.
Finally, this function has C linkage, so you must declare it with: extern "C" in order for the linker to correctly resolve the reference. Failure to do this will result in an "unresolved external" linker error.
- 6/4/2010
- Geoff Darst - MSFT
- 6/8/2010
- Geoff Darst - MSFT
The short of it: RtlUnwindEx has special handling for exception codes of STATUS_LONGJUMP and STATUS_UNWIND_CONSOLIDATE. This is important to developers of compilers and libraries.
The long of it: http://www.nynaeve.net/?p=105 http://www.nynaeve.net/?p=110
- 9/28/2008
- KJK_Hyperion