Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_count_entries()

Returns the number of LDAPMessage structures representing directory entries in a chain of search results.

Syntax

#include <ldap.h>
int ldap_count_entries( LDAP *ld, LDAPMessage *result );

Parameters

This function has the following parameters:

ld

Connection handle, which is a pointer to an LDAP structure containing information about the connection to the LDAP server.

result

Chain of search results, represented by the pointer to an LDAPMessage structure.

Returns

One of the following values:

Description

The ldap_count_entries() function returns the number of LDAPMessage structures representing directory entries in a chain of search results. These messages have the type LDAP_RES_SEARCH_ENTRY.

Note that if you pass in a pointer to an LDAPMessage structure in the middle of the chain of results, the function counts only the entries between that structure and the last structure in the chain. In this type of situation, the function does not return the count of all entries in the chain.

For more information on using this function, see "Iterating Through a Chain of Results" on page 124

Example

See the examples under ldap_search_ext() and ldap_search_ext_s().

See Also

ldap_result(), ldap_search_ext(), ldap_search_ext_s(), ldap_first_entry(), ldap_next_entry(), ldap_first_message(), ldap_next_message().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23