Platform SDK: Active Directory, ADSI, and Directory Services

ldap_rename_ext

The ldap_rename_ext function changes the name of an entry. This function is available effective with LDAP 3.

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

Parameters

ld
[in] The session handle.
dn
[in] The distinguished name of the entry to be renamed.
NewRDN
[in] New relative distinguished name for the entry.
NewParent
[in] The new parent for this entry.
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.
MessageNumber
[out] The message ID for the request.

Return Values

If the function succeeds, it returns the message ID of the modify operation.

If the function fails, it returns -1 and sets the session error parameters in the LDAP structure.

Remarks

This function provides extended renaming operations. For example, you can pass controls that separate the parent from the relative distinguished name, for clarity.

Multithreading: Calls to ldap_rename_ext are thread-safe.

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, Modifying a Directory Entry