ldap_count_values_len() function returns the number of values in an array of berval structures. Use the ldap_count_values() function instead of this function if the array contains strings.
For additional information, see "Getting the Values of an Attribute" on page 131.
#include <ldap.h>
int ldap_count_values_len( struct berval **vals );
values |
#include <ldap.h>
LDAP *ld;
LDAPMessage *e;
char *a="jpegPhoto";
struct berval **bvals;
int count;
...
/* Get the values of the jpegPhoto attribute */
bvals = ldap_get_values_len( ld, e, a );
/* Count the values of the attribute */
count = ldap_count_values_len( vals );
...
ldap_count_values(), ldap_get_values_len().
Last Updated: 10/01/98 17:06:23