ldap_get_values_len function
The ldap_get_values_len function retrieves the list of values for a given attribute.
Syntax
struct berval** ldap_get_values_len(
_In_ LDAP *ExternalHandle,
_In_ LDAPMessage *Message,
_In_ PCHAR attr
);
Parameters
- ExternalHandle [in]
-
The session handle.
- Message [in]
-
Handle to the LDAPMessage structure.
- attr [in]
-
A pointer to a null-terminated string that contains the attribute whose values are to be retrieved.
Return value
If the function succeeds, it returns a null-terminated list of pointers to berval structures that contain the values of the specified attribute. If no attribute values were found, it returns NULL. The session error parameter in the LDAP data structure is set to 0 in either case.
If the function fails, it returns NULL and the session error parameter in the LDAP data structure is set to the LDAP error code.
Remarks
Use ldap_get_values_len when parsing a search response to obtain the value or values of an attribute. Use this function when the attribute contains binary data; for attributes whose values are null-terminated character strings, use ldap_get_values.
The entry is obtained by calling ldap_first_entry or ldap_next_entry. The attribute should be one returned by a call to ldap_first_attribute, ldap_next_attribute, or a caller-supplied string (for example, "mail").
Call ldap_value_free_len to release the returned value when it is no longer required.
Requirements
|
Minimum supported client |
Windows Vista |
|---|---|
|
Minimum supported server |
Windows Server 2008 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
ldap_get_values_lenW (Unicode) and ldap_get_values_lenA (ANSI) |
See also
- berval
- Functions
- ldap_first_attribute
- ldap_first_entry
- ldap_get_values
- ldap_next_attribute
- ldap_next_entry
- ldap_value_free_len
- LDAPMessage