Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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

Syntax

ULONG ldap_get_next_page(
  LDAP* 
ExternalHandle,
  LDAPSearch* 
SearchHandle,
  ULONG 
PageSize,
  ULONG* 
MessageNumber
);

Parameters

ExternalHandle

[in] Session handle.

SearchHandle

[in] Handle to the search block.

PageSize

[in] Number of entries to return in a single page.

MessageNumber

[out] Message identifier for the request.

Return Value

If this function succeeds, it returns the message identifier of the operation.

If this function fails, it returns –1 and sets the session error parameters in the LDAP data structure.

Remarks

This function is part of the interface for simple, asynchronous paging of search results. Use the search handle returned from an initial call to ldap_search_init_pageand specify, in the PageSizeparameter, the number of entries to be returned in a page. Set PageSizeto 0 (zero) to abandon a search.

Note:
After each call to this function, you must call ldap_get_paged_countfor each set of results returned from the server. This allows the LDAP run time to save off the cookie that the server passed back to maintain the state of the search. Other than calling ldap_get_paged_count, the results you get back from ldap_get_next_pagecan be treated as any other search result and should be freed when you are done by calling the ldap_msgfreefunction.

If you prefer to retrieve paged search results synchronously, use the ldap_get_next_page_sfunction.

Requirements

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

See Also