Platform SDK: Active Directory, ADSI, and Directory Services |
The ldap_modrdn2_s function (or its asynchronous equivalent, ldap_modrdn2) is used to change the name of an LDAP entry.
ULONG ldap_modrdn2_s ( LDAP* ExternalHandle, PCHAR DistinguishedName, PCHAR NewDistinguishedName, INT DeleteOldRdn );
If the function succeeds, the return value is LDAP_SUCCESS.
If the function fails, it returns an error code. See Return Values or more information.
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 access to name-change functions. This functionality is available by calling ldap_rename_ext or ldap_rename_ext_s. We recommend using these functions rather thanf the ldap_modrdn* functions, to change the name of an entry.
Note When connecting to an LDAP 2 server, the application must perform a bind operation (by calling one of the ldap_bind or ldap_simple_bind routines) before attempting any other operations.
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.
Functions, ldap_bind ldap_modrdn2, ldap_rename_ext, ldap_rename_ext_s, ldap_simple_bind, Modifying a Directory Entry