Platform SDK: Active Directory, ADSI, and Directory Services

ldap_get_paged_count

The ldap_get_paged_count function records the number of paged results that the server has returned for a search.

ULONG ldap_get_paged_count(
  PLDAP ExternalHandle,
  PLDAPSearch SearchBlock,
  ULONG* TotalCount,
  PLDAPMessage Results
);

Parameters

ExternalHandle
[in] The session handle.
SearchBlock
[in] Handle to an LDAPSearch structure.
TotalCount
[out] The total number of pages in the search results.
Results
[out] A pointer to the LDAPMessage structure that contains the results of the operation.

Return Values

If the function succeeds, the return value is LDAP_SUCCESS.

If the function fails, it returns an error code. See Return Values for more information.

Remarks

You must call ldap_get_paged_count for each set of results that you get after calling ldap_get_next_page. This allows the LDAP run time to save from the cookie that the server uses to keep track of the search.

If you call ldap_get_next_page_s, you don't need to call ldap_get_paged_count.

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_next_page_s, LDAPMessage, LDAPSearch, Return Values