Share via


ProtectionPolicyManager.PolicyChanged 事件

定义

注意

从 2022 年 7 月开始,Microsoft 将弃用 Windows 信息保护 (WIP) 和支持 WIP 的 API。 Microsoft 将继续在受支持的 Windows 版本上支持 WIP。 新版本的 Windows 不包含 WIP 的新功能,将来的 Windows 版本中不支持它。 有关详细信息,请参阅宣布 Windows 信息保护的日落

出于数据保护需求,Microsoft 建议使用Microsoft Purview 信息保护Microsoft Purview 数据丢失防护。 Purview 简化了配置设置,并提供一组高级功能。

为响应由策略 CSP 管理的 Windows 信息保护 (WIP) 策略中的更改而引发的事件。

// Register
static event_token PolicyChanged(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void PolicyChanged(event_token const* cookie) const;

// Revoke with event_revoker
static ProtectionPolicyManager::PolicyChanged_revoker PolicyChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> PolicyChanged;
function onPolicyChanged(eventArgs) { /* Your code */ }
Windows.Security.EnterpriseData.ProtectionPolicyManager.addEventListener("policychanged", onPolicyChanged);
Windows.Security.EnterpriseData.ProtectionPolicyManager.removeEventListener("policychanged", onPolicyChanged);
- or -
Windows.Security.EnterpriseData.ProtectionPolicyManager.onpolicychanged = onPolicyChanged;
Public Shared Custom Event PolicyChanged As EventHandler(Of Object) 

事件类型

Windows 要求

设备系列
Windows Desktop Extension SDK (在 10.0.10586.0 中引入)
Windows Mobile Extension SDK (在 10.0.10586.0 中引入)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (在 v2.0 中引入)

适用于