Directory Services


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


[in] The session handle.
[in] Handle to an LDAPSearch structure.
[out] The total pages in the search 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. For more information, see Return Values.


Call ldap_get_paged_count for each result set received after calling ldap_get_next_page. This allows the LDAP runtime to save from the cookie that the server uses to track the search.

If you call ldap_get_next_page_s, a call to ldap_get_paged_count is not required.


Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
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