LsaRegisterPolicyChangeNotification function (ntsecapi.h)

The LsaRegisterPolicyChangeNotification function registers an event handle with the local security authority (LSA). This event handle is signaled whenever the indicated LSA policy is modified.

Syntax

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

Parameters

[in] InformationClass

A POLICY_NOTIFICATION_INFORMATION_CLASS value that specifies the type of policy changes about which your application will be notified. Specify one of the following values.

Value Meaning
PolicyNotifyAuditEventsInformation
Auditing policy changes.
PolicyNotifyAccountDomainInformation
Account domain information changes.
PolicyNotifyServerRoleInformation
Server role changes.
PolicyNotifyDomainEfsInformation
EFS policy information changes.
PolicyNotifyDomainKerberosTicketInformation
Kerberos ticket policy information changes.
PolicyNotifyDnsDomainInformation
Domain Name System (DNS) information, name, or SID of the system's primary domain changes.

[in] NotificationEventHandle

A handle to an event obtained by calling the CreateEvent function. The event can be either named or unnamed.

Return value

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code. For more information, see LSA Policy Function Return Values.

You can use the LsaNtStatusToWinError function to convert the NTSTATUS code to a Windows error code.

Remarks

When you have finished using a notification event that has been registered by the LsaRegisterPolicyChangeNotification function, unregister it by calling the LsaUnregisterPolicyChangeNotification function.

For an example that demonstrates calling this function, see Receiving Policy Change Events.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header ntsecapi.h
Library Secur32.lib
DLL Secur32.dll

See also

LsaUnregisterPolicyChangeNotification