Skip to content

Latest commit

 

History

History
81 lines (65 loc) · 3.25 KB

nf-processthreadsapi-setprocessdynamicehcontinuationtargets.md

File metadata and controls

81 lines (65 loc) · 3.25 KB
UID title ms.date targetos description req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs
NF:processthreadsapi.SetProcessDynamicEHContinuationTargets
SetProcessDynamicEHContinuationTargets
4/28/2020
Windows
Sets dynamic exception handling continuation targets for the specified process.
function
processthreadsapi.h
Windows 10 Build 20348
Windows 10 Build 20348
apiref
processthreadsapi.h
SetProcessDynamicEHContinuationTargets
SetProcessDynamicEHContinuationTargets
processthreadsapi/SetProcessDynamicEHContinuationTargets
c++

-description

Sets dynamic exception handling continuation targets for the specified process.

-parameters

-param Process

A handle to the process. This handle must have the PROCESS_SET_INFORMATION access right. For more information, see Process Security and Access Rights.

-param NumberOfTargets

Supplies the number of dynamic exception handling continuation targets to set.

-param Targets

A pointer to an array of dynamic exception handling continuation targets. For more information on this structure, see PROCESS_DYNAMIC_EH_CONTINUATION_TARGET.

-returns

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError. Note that even if the function fails, a portion of the supplied continuation targets may have been successfully processed. The caller needs to check the flags in each individual continuation target specified via Targets to determine if it was successfully processed.

-remarks

If user-mode Hardware-enforced Stack Protection is enabled for a process, when calling APIs that modify the execution context of a thread such as RtlRestoreContext and SetThreadContext, validation is performed on the Instruction Pointer specified in the new execution context. RtlRestoreContext is used during Structured Exception Handling (SEH) exception unwinding to unwind to the target frame that contains the __except block and to start executing code at the continuation target. Therefore, the operating system needs to know the instruction addresses of all the valid continuation targets in order to allow the unwind operation via RtlRestoreContext. For compiled binaries, the list of continuation targets is generated by the linker and stored in the binary image. For dynamic code, the continuation targets need to be specified using SetProcessDynamicEHContinuationTargets.

-see-also