Directory Services |
The LDAP_SERVER_NOTIFICATION_OID control is used with an extended LDAP asynchronous search function to register the client to be notified when changes are made to an object in Active Directory.
To use this control, set the members of the LDAPControl structure as follows.
PWCHAR ldctl_oid = LDAP_SERVER_NOTIFICATION_OID; struct berval ldctl_value = {0, NULL}; BOOLEAN ldctl_iscritical;
This control is used with an extended LDAP search function such as ldap_search_ext to register a change notification request of the directory objects that match the search filter specified. The control is part of the SearchRequest and SearchResultDone messages in the control fields of LDAPMessage. A client can register up to five (5) notification requests with this control.
Notifications are asychronous operations. The server sends SearchEntry responses, that contain the modified objects, to the client using the LDAPMessage ID of the original notification request. Notifications from this control may be canceled using the LDAP Abandon function. For more information about Notifications in Active Directory, see Change Notifications in Active Directory.
Limitations of the Server Notification Control include:
Using a filter other than (objectclass =*) and attempting a subtree level search on a container that is not the root of a Naming Context will return the UnwillingToPerform (53) error message.
The user application must have the proper directory service access rights to successfully use this control. The user application must have permission to read the objects that fall within the scope of the search function using this control. Any object that is not accessed with the proper permission will not generate a change notification when its contents are modified.
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Winldap.h.