ldap_dn2ufnW function (winldap.h)

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

Syntax

WINLDAPAPI PWCHAR LDAPAPI ldap_dn2ufnW(
  [in] const PWSTR dn
);

Parameters

[in] dn

A pointer to a null-terminated string that contains the distinguished name to convert.

Return value

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.

Note

The winldap.h header defines ldap_dn2ufn as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

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_memfree