LsaRegisterPolicyChangeNotification 函数 (ntsecapi.h)

LsaRegisterPolicyChangeNotification 函数向 LSA) (本地安全机构注册事件句柄。 每当修改指示的 LSA 策略时,都向此事件句柄发出信号。

语法

NTSTATUS LsaRegisterPolicyChangeNotification(
  [in] POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass,
  [in] HANDLE                                NotificationEventHandle
);

参数

[in] InformationClass

一个 POLICY_NOTIFICATION_INFORMATION_CLASS 值,该值指定将通知应用程序的策略更改的类型。 指定以下值之一。

含义
PolicyNotifyAuditEventsInformation
审核策略更改。
PolicyNotifyAccountDomainInformation
帐户域信息更改。
PolicyNotifyServerRoleInformation
服务器角色更改。
PolicyNotifyDomainEfsInformation
EFS 策略信息更改。
PolicyNotifyDomainKerberosTicketInformation
Kerberos 票证策略信息更改。
PolicyNotifyDnsDomainInformation
域名系统 (DNS) 系统的主域更改的信息、名称或 SID。

[in] NotificationEventHandle

通过调用 CreateEvent 函数获取的事件句柄。 事件可以是命名的,也可以是未命名的。

返回值

如果函数成功,则返回值STATUS_SUCCESS。

如果函数失败,则返回值为 NTSTATUS 代码。 有关详细信息,请参阅 LSA 策略函数返回值

可以使用 LsaNtStatusToWinError 函数将 NTSTATUS 代码转换为 Windows 错误代码。

注解

使用完由 LsaRegisterPolicyChangeNotification 函数注册的通知事件后,通过调用 LsaUnregisterPolicyChangeNotification 函数取消注册该事件。

有关演示如何调用此函数的示例,请参阅 接收策略更改事件

要求

要求
最低受支持的客户端 Windows XP [仅限桌面应用]
最低受支持的服务器 Windows Server 2003 [仅限桌面应用]
目标平台 Windows
标头 ntsecapi.h
Library Secur32.lib
DLL Secur32.dll

另请参阅

LsaUnregisterPolicyChangeNotification