Platform SDK: Active Directory, ADSI, and 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] 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

  Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Winldap.h.
  Library: Use Wldap32.lib.
  Unicode: Declared as Unicode and ANSI prototypes.

See Also

Functions, ldap_value_free