ldap_parse_page_control (Compact 2013)
3/26/2014
This function parses the results of a search into pages.
Syntax
ULONG ldap_parse_page_control(
LDAP* ExternalHandle,
LDAPControl** ServerControls,
ULONG* TotalCount,
struct berval** Cookie
);
Parameters
- ExternalHandle
[in] Session handle.
- ServerControls
[in] Array of controls that includes a page control. The page control contains the cookie and total count fields returned by the server.
- TotalCount
[in] Pointer to the total count of entries returned in this page.
- Cookie
[out] Opaque cookie used by the server to determine its location in the result set.
Return Value
If this function succeeds, the return value is LDAP_SUCCESS.
If this function fails, it returns an error code. See the LDAP_RETCODE enumeration for a list of possible return values.
Remarks
Use this function in conjunction with ldap_create_page_control and ldap_parse_result to implement the simple paging of results by means of controls. After calling ldap_parse_page_control to retrieve the server controls and extract the cookie from the search result, call ldap_parse_result to parse the results. Then use the cookie to call ldap_create_page_control to retrieve the next page of results.
Requirements
Header |
winldap.h |
Library |
wldap32.lib |
See Also
Reference
LDAP Search Functions
LDAP_RETCODE
ldap_create_page_control
ldap_parse_result