ldap_create_page_control
This function creates a simple control for paging results.
ULONG ldap_create_page_control(
LDAP* ExternalHandle,
ULONG PageSize,
struct berval* Cookie,
UCHAR IsCritical,
LDAPControl** Control
);
Parameters
- ExternalHandle
[in] Session handle. - PageSize
[in] Number of entries to return in each page. - Cookie
[in] Pointer to a berval structure that the server uses to determine its location in the result set. This is an opaque structure that you should not access directly. Set to NULL for the first call to ldap_create_page_control. - IsCritical
[in] Tells the server whether this control is critical to the search. - Control
[out] Pointer to the newly created control.
Return Values
The following table shows the possible return values.
Value | Description |
---|---|
LDAP_SUCCESS | The call was completed successfully. |
LDAP_UNAVAILABLE_CRIT_EXTENSION | The control is critical and the server does not support the control. |
Remarks
This function creates a simple paged-results control. The control allows the client to specify the rate at which an LDAP server returns the results of a search operation. This is useful when the client has limited resources and may not be able to process the entire result set from a given LDAP query or when the client/server connection is slow.
To create the paged-results control, specify the number of entries you want returned in a single page. If you want the server to return results normally, and it cannot support this control, set the IsCritical parameter to FALSE.
When this function returns successfully, include the newly created control to the list of server controls in a call to ldap_search_ext or to ldap_search_ext_s. When the server returns the first page of results, call the ldap_parse_result function to retrieve the first page of results.
Call the ldap_control_free function when the control is no longer needed.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Winldap.h.
Link Library: Wldap32.lib.
See Also
ldap_control_free | ldap_parse_page_control | ldap_parse_result | ldap_search_ext | ldap_search_ext_s
Last updated on Friday, April 09, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.