大网数据广告活动
性能与资源

RtlSetImageMitigationPolicy

· 52CE 我爱测

Sets the specified mitigation policy for specified image.

Sets the specified mitigation policy for the specified image.

NTSYSAPI NTSTATUS NTAPI RtlSetImageMitigationPolicy(
    _In_opt_ PCWSTR ImagePathName,
    _In_ IMAGE_MITIGATION_POLICY MitigationPolicy,
    _In_ ULONG Flags,
    _In_reads_bytes_opt_(BufferSize) PVOID Buffer,
    _In_ ULONG BufferSize
    )

Parameters

ImagePathName

The name of the image on which mitigation policy is set. If ImagePathName is NULL, the system mitigation policy is being set.

MitigationPolicy

The mitigation policy that is to be set. This parameter supports the following enumeration values:

Field name Value Description
ImageUserShadowStackPolicy 15 The policy regarding user-mode, hardware-enforced, stack protection for the process. The SetProcessMitigationPolicy function sets the policy flags for user-mode, hardware-enforced, stack protection when a PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY structure is provided.

Flags

Flags that control the behavior of the set operation. Supported flags for this parameter include:

Flag Value Description
MITIGATION_POLICY_FLAG_RESET_VALUE 0x0 Resets the policy value to the default for the system
MITIGATION_POLICY_FLAG_USE_AUDIT_POLICY 0x8 Used to get/set the audit policy for the given mitigation

Buffer

A pointer to the buffer that holds the policy data.

BufferSize

The length in bytes of the buffer provided in Buffer.

Return value

Returns an NTSTATUS success or error code.

Remarks

This API is not defined in a Windows SDK header file and must be manually declared. The API is exported from ntdll.dll.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1709
DLL Ntdll.dll

See also

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 07/14/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。