ldap_count_valuesW function (winldap.h)

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

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_count_valuesW(
  [in] PWCHAR *vals
);

Parameters

[in] vals

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

Return value

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.

Remarks

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.

Note

The winldap.h header defines ldap_count_values as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header winldap.h
Library Wldap32.lib
DLL Wldap32.dll

See also

Functions

LDAP

Searching a Directory

berval

ldap_count_values_len

ldap_get_values