SetProcessValidCallTargets function

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

Provides Control Flow Guard (CFG) with a list of valid indirect call targets and specifies whether they should be marked valid or not. The valid call target information is provided as a list of offsets relative to a virtual memory range

(start and size of the range). The call targets specified should be 16-byte aligned and in ascending

order.

Syntax

BOOL SetProcessValidCallTargets(
  HANDLE                hProcess,
  PVOID                 VirtualAddress,
  SIZE_T                RegionSize,
  ULONG                 NumberOfOffsets,
  PCFG_CALL_TARGET_INFO OffsetInformation
);

Parameters

hProcess

The handle to the target process.

VirtualAddress

The start of the virtual memory region whose call targets are being marked valid.

RegionSize

The size of the virtual memory region.

NumberOfOffsets

The number of offsets relative to the virtual memory ranges.

OffsetInformation

A list of offsets and flags relative to the virtual memory ranges.

Return Value

TRUE if the operation was successful; otherwise, FALSE. To retrieve error values for this function, call GetLastError.

Requirements

   
Minimum supported client Windows 10 [desktop apps | UWP apps]
Minimum supported server Windows Server 2016 [desktop apps | UWP apps]
Target Platform Windows
Header memoryapi.h (include Windows.h, Memoryapi.h)
DLL Kernelbase.dll