ldap_modrdn_sA function (winldap.h)

The ldap_modrdn_s function changes the relative distinguished name of an LDAP entry.

This function is obsolete and is provided for backward compatibility with earlier versions of LDAP. For LDAP 3 or later, use the ldap_rename_ext or ldap_rename_ext_s function.

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_modrdn_sA(
  [in]  LDAP       *ExternalHandle,
  [in]  const PSTR DistinguishedName,
  [out] const PSTR NewDistinguishedName
);

Parameters

[in] ExternalHandle

The session handle.

[in] DistinguishedName

A pointer to a null-terminated string that contains the distinguished name of the entry to be changed.

[out] NewDistinguishedName

A pointer to a null-terminated string that contains the new relative distinguished name to give the entry.

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

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.

Be aware that the ldap_modrdn functions enable you to change only the relative distinguished name, which is the least significant component of the object's distinguished name. Effective with version 3, LDAP provides the Modify Distinguished Name protocol operation that allows more general name change access. This feature is available by calling ldap_rename_ext or ldap_rename_ext_s. These functions are recommended, instead of the ldap_modrdn_s function, to change an entry name.

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_modrdn

ldap_modrdn2

ldap_modrdn2_s

ldap_rename_ext

ldap_rename_ext_s