Share via


ldap_get_next_page_s (Windows Embedded CE 6.0)

1/6/2010

This function returns the next page in a sequence of synchronous paged search results.

Syntax

ULONG ldap_get_next_page_s(
  LDAP* ExternalHandle,
  LDAPSearch* SearchHandle,
  LDAP_TIMEVAL* timeout,
  ULONG PageSize,
  ULONG* TotalCount,
  LDAPMessage** Results
);

Parameters

  • ExternalHandle
    [in] Session handle.
  • SearchHandle
    [in] Handle to the search block.
  • timeout
    [in] Length of time in seconds the client is willing to wait for the call to return.
  • PageSize
    [in] Number of entries to return in a single page.
  • TotalCount
    [out] 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] Pointer to the LDAPMessage structure that contains the results of the operation.

Return Value

If the server returns a null cookie (noncontinuation), 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 the LDAP_RETCODE enumeration for a list of possible return values.

Remarks

This 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 0 (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 are done by calling the ldap_msgfree function.

If you prefer to retrieve paged search result asynchronously, 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

Header winldap.h
Library wldap32.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

LDAP Search Functions
LDAP_RETCODE
ldap_get_next_page
ldap_get_paged_count
LDAPMessage
ldap_msgfree
ldap_search_init_page