Directory Services

ldap_dn2ufn

The ldap_dn2ufn function converts a distinguished name to a user-friendly format.

PCHAR ldap_dn2ufn(
  PCHAR dn
);

Parameters

dn
[in] A pointer to a null-terminated string that contains the distinguished name to convert.

Return Values

If the function is successful, the user-friendly name is returned as a pointer to a null-terminated character string.

If the function fails, NULL is returned.

Remarks

When given an entry distinguished name, ldap_dn2ufn returns a null-terminated character string that contains the entry name in a user-friendly format. The composition of the user-friendly format is based on the format described in RFC 1781, and depends upon the directory service implementation and the type of entry. The return value remains in memory-allocated space until you call ldap_memfree.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Unicode: Implemented as Unicode and ANSI versions on all platforms.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.

See Also

Functions, ldap_memfree