ldap_get_dnA function (winldap.h)

The ldap_get_dn function retrieves the distinguished name for a given entry.

Syntax

WINLDAPAPI PCHAR LDAPAPI ldap_get_dnA(
  [in] LDAP        *ld,
  [in] LDAPMessage *entry
);

Parameters

[in] ld

The session handle.

[in] entry

The entry whose distinguished name is to be retrieved.

Return value

If the function succeeds, it returns the distinguished name as a pointer to a null-terminated character string.

If the function fails, it returns NULL and sets the session error parameters in the LDAP data structure.

Remarks

The ldap_get_dn function retrieves the distinguished name for an entry that was returned by ldap_first_entry, or ldap_next_entry. When the returned name is no longer needed, free the string by calling ldap_memfree.

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

ldap_first_entry

ldap_memfree

ldap_next_entry