Platform SDK: Active Directory, ADSI, and Directory Services

ldap_get_next_page_s

The ldap_get_next_page_s function returns the next page in a sequence of synchronous paged search results. This function is available in LDAP 3 and later.

ULONG ldap_get_next_page_s(
  PLDAP ExternalHandle,
  PLDAPSearch SearchHandle,
  struct l_timeval* timeout,
  ULONG PageSize,
  ULONG* TotalCount,
  LDAPMessage** Results
);

Parameters

ExternalHandle
[in] The session handle.
SearchHandle
[in] Handle to the search block.
timeout
[in] The length of time the client is willing to wait for the call to return.
PageSize
[in] The number of entries to return in a single page.
TotalCount
[out] The server's estimate of the total number of entries in the entire result set. A value of zero means that the server could not provide an estimate.
Results
[out] A pointer to the LDAPMessage structure that contains the results of the operation.

Return Values

If the server returns a null cookie (non-continuation), the value will be LDAP_NO_RESULTS_RETURNED. Otherwise, the client signals a continuation (more data available) by returning LDAP_SUCCESS.

If the function otherwise fails, it returns the error code pertinent to the failure. See Return Values for more information.

Remarks

The ldap_get_next_page_s function is part of the interface for simple, synchronous paging of search results. Use the search handle returned from an initial call to ldap_search_init_page and specify, in the PageSize parameter, the number of entries to be returned in a page. Set PageSize to zero to abandon a search.

The results you get back from ldap_get_next_page_s can be treated as any other search result, and should be freed when you're done by calling ldap_msgfree.

If you prefer to retrieve paged search result asychronously, use ldap_get_next_page.

Using ldap_get_next_page_s eliminates the need to call ldap_get_paged_count to record the number of paged results returned by a server.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Winldap.h.
  Library: Use Wldap32.lib.

See Also

Functions, ldap_get_next_page, ldap_get_paged_count, LDAPMessage, ldap_msgfree, ldap_search_init_page, Return Values