ldap_ufn2dn function (winldap.h)
The ldap_ufn2dn function converts a user-friendly name to a distinguished name.
Syntax
WINLDAPAPI ULONG LDAPAPI ldap_ufn2dn(
[in] const PSTR ufn,
[out] PSTR *pDn
);
Parameters
[in] ufn
Pointer to a null-terminated string that contains the user-friendly name to convert.
[out] pDn
Pointer to a variable that receives a pointer to a null-terminated string that contains the resulting distinguished name.
If the pDn parameter returns non-NULL, free it with a call to ldap_memfree.
Return value
If the function succeeds, the return value is LDAP_SUCCESS.
If the function fails, it returns an error code. For more information, see Return Values.
Remarks
The ldap_ufn2dn function attempts to normalize a user-specified name to a distinguished name. For example, consider an LDAP directory format for a common name of LastName, FirstName. Given a directory name of "Jeff Smith," ldap_ufn2dn will attempt to normalize this to "Smith, Jeff." The function follows RFC 1781; add CN= if not present, add OU= if none present, and so on. If it runs into any errors while normalizing, the function returns a copy of what was passed. It then allocates the output string from the LDAP memory pool.
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 |