Share via


ldap_get_next_page (Windows Embedded CE 6.0)

1/6/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_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.

Note

After each call to this function, you must call ldap_get_paged_count for 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_page 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 results synchronously, use the ldap_get_next_page_s function.

Requirements

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

See Also

Reference

LDAP Search Functions
LDAP
ldap_get_next_page_s
ldap_get_paged_count
ldap_msgfree
ldap_search_init_page