Platform SDK: Active Directory, ADSI, and Directory Services

ldap_modrdn_s

The ldap_modrdn_s function changes the relative distinguished name (RDN) of an LDAP entry. This function is obsolete and is provided solely for compatibility with LDAP 1 implementations.

ULONG ldap_modrdn_s (
  LDAP* ExternalHandle,
  PCHAR DistinguishedName,
  PCHAR NewDistinguishedName
);

Parameters

ExternalHandle
[in] The session handle.
DistinguishedName
[in] The distinguished name of the entry to be changed.
NewDistinguishedName
[out] The new relative distinguished name to give the entry.

Return Values

If the function succeeds, the return value is LDAP_SUCCESS.

If the function fails, it returns an error code. See Return Values for more information.

Remarks

Use the ldap_modrdn_s function (or its asynchronous equivalent, ldap_modrdn) to change the name of an LDAP entry. This function provides compatibility with LDAP 1. Otherwise, use ldap_modrdn2 or ldap_modrdn2_s .

Note that the ldap_modrdn function allows you to change only the least significant component of the relative distinguished name. Effective with version 3, LDAP provides the Modify Distinguished Name protocol operation that allows more general name change access. This functionality is available by calling ldap_rename_ext or ldap_rename_ext_s. We recommend using these functions instead of the ldap_modrdn function to change the name of an entry.

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.

See Also

Functions, ldap_modrdn, ldap_modrdn2, ldap_modrdn2_s, ldap_rename_ext, ldap_rename_ext_s