Directory Services

ldap_explode_dn

The ldap_explode_dn function breaks up an entry name into its component parts.

PCHAR* ldap_explode_dn(
  PCHAR dn,
  ULONG notypes
);

Parameters

dn
[in] A pointer to a null-terminated string that contains the distinguished name to explode.
notypes
[in] Indicates whether the type information components should be removed.

Return Values

If the function succeeds, it returns a null-terminated character array containing the relative distinguished name components of the distinguished name supplied.

Remarks

Call ldap_explode_dn to separate a distinguished name into its component parts. Set the notypes parameter to a nonzero value to remove type information, such as "cn=" from the components. The components of the relative distinguished name are returned in a character array. Free this array when it is no longer needed by calling ldap_value_free.

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_value_free