ldap_rename_extW function (winldap.h)

The ldap_rename_ext function starts an asynchronous operation that changes the distinguished name of an entry in the directory. This function is available effective with LDAP 3.

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_rename_extW(
  [in]  LDAP          *ld,
  [in]  const PWSTR   dn,
  [in]  const PWSTR   NewRDN,
  [in]  const PWSTR   NewParent,
  [in]  INT           DeleteOldRdn,
  [in]  PLDAPControlW *ServerControls,
  [in]  PLDAPControlW *ClientControls,
  [out] ULONG         *MessageNumber
);

Parameters

[in] ld

The session handle.

[in] dn

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

[in] NewRDN

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

[in] NewParent

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.

[in] DeleteOldRdn

TRUE if the old relative distinguished name should be deleted; FALSE if the old relative distinguished name should be retained.

[in] ServerControls

List of LDAP server controls.

[in] ClientControls

List of client controls.

[out] MessageNumber

Pointer to a variable that receives the message identifier for this asynchronous operation. Use this identifier with the ldap_result function to retrieve the results of the operation.

Return value

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

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.

Note

The winldap.h header defines ldap_rename_ext as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

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

Extended Controls

Functions

Modifying a Directory Entry

Using Controls