Directory Services

ldap_rename_ext_s

The ldap_rename_ext_s function is a synchronous operation that changes the distinguished name of an entry in the directory. This function is available effective with LDAP 3.

ULONG ldap_rename_ext_s(
  LDAP* ld,
  PWCHAR dn,
  PWCHAR NewRDN,
  PWCHAR NewParent,
  INT DeleteOldRdn,
  PLDAPControl* ServerControls,
  PLDAPControl* ClientControls
);

Parameters

ld
[in] The session handle.
dn
[in] A pointer to a wide, null-terminated string that contains the distinguished name of the entry to be renamed.
NewRDN
[in] A pointer to a wide, null-terminated string that contains the new relative distinguished name.
NewParent
[in] A pointer to a wide, null-terminated string that contains the distinguished name of the new parent for this entry. This parameter enables you to move the entry to a new parent container.
DeleteOldRdn
[in] TRUE if the old relative distinguished name should be deleted; FALSE if the old relative distinguished name should be retained.
ServerControls
[in] List of LDAP server controls.
ClientControls
[in] List of client controls.

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

Multithreading: Calls to ldap_rename_ext_s are thread-safe.

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

Extended Controls, Using Controls, Functions, Modifying a Directory Entry