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 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. For more information, see Return Values.

Remarks

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.

Requirements

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