Directory Services


The ldap_count_values function counts the number of values in a list.

ULONG ldap_count_values(
  PCHAR* vals


[in] An array of null-terminated strings (values) returned by ldap_get_values.

Return Values

This function returns the number of values in the array. There is no error return.

If a NULL pointer is passed as the argument, 0 is returned. If an invalid argument is passed, the value returned is undefined.


The ldap_count_values function returns the number of values in an array of strings. To count binary values in an array of berval structures, call ldap_count_values_len.


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.
Unicode: Implemented as Unicode and ANSI versions on all platforms.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.

See Also

berval, Functions, ldap_count_values_len, ldap_get_values, LDAP, Searching a Directory