ldap_count_values()--Retrieve Count of Attribute Values


  Syntax
 #include <ldap.h>
 

 int ldap_count_values(
           char          **vals)

  Library Name/Service Program: QSYS/QGLDCLNT

  Default Public Authority: *USE

  Threadsafe: Yes

The ldap_count_values() function returns the number of values in the array returned by the ldap_get_values() function.


Authorities and Locks

No IBM® i authority is required.


Parameters

vals
(Input) A pointer to a null-terminated array of attribute values, as returned by ldap_get_values().

Return Value

Number of Values
if the request is successful, ldap_count_values() returns the number of values in the array returned by the ldap_get_values() function.

-1
if the request was not successful.

Error Conditions

If ldap_count_values() is not successful, ld_errno will be set to indicate the error. See LDAP Client API Error Conditions for possible LDAP error code values. Use ldap_get_errno() function to retrieve the error information.


Error Messages

The following message may be sent from this function.

Message ID Error Message Text
CPF3CF2 E Error(s) occurred during running of ldap_count_values API.


Related Information


API introduced: V4R3

[ Back to top | LDAP APIs | APIs by category ]