Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function retrieves the list of values for a given attribute.

Syntax

struct berval** ldap_get_values_len(
  LDAP* 
ExternalHandle,
  LDAPMessage* 
Message,
  UNICODE PTCHAR 
attr
);

Parameters

ExternalHandle

[in] Session handle.

Message

[in] Handle to the LDAPMessagestructure.

attr

[in] Attribute whose values are to be retrieved.

Return Value

If this function succeeds, it returns a null-terminated list of pointers to bervalstructures containing the values of the specified attribute.

Remarks

Use this function 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 the ldap_get_valuesfunction instead.

The entry is obtained by calling ldap_first_entryor 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 the ldap_value_free_lenfunction to release the returned value when it is no longer needed.

Requirements

Header winldap.h
Library wldap32.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also