ldap_modrdn2_s function
The ldap_modrdn2_s function changes the relative distinguished name of an LDAP entry.
This function is obsolete. For LDAP 3 or later, use the ldap_rename_ext or ldap_rename_ext_s functions.
Syntax
ULONG ldap_modrdn2_s( _In_ LDAP *ExternalHandle, _In_ PCHAR DistinguishedName, _In_ PCHAR NewDistinguishedName, _In_ INT DeleteOldRdn );
Parameters
- ExternalHandle [in]
-
The session handle.
- DistinguishedName [in]
-
A pointer to a null-terminated string that contains the distinguished name to change.
- NewDistinguishedName [in]
-
A pointer to a null-terminated string that contains the new relative distinguished name to give the entry.
- DeleteOldRdn [in]
-
TRUE if the old relative distinguished name should be deleted; FALSE if the old relative distinguished name should be retained.
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
Be aware that the various ldap_modrdn functions allow 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 access to name-change functions. This feature is available by calling ldap_rename_ext or ldap_rename_ext_s. These functions are recommended, rather than the ldap_modrdn2_s function, to change an entry name.
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.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | ldap_modrdn2_sW (Unicode) and ldap_modrdn2_sA (ANSI) |
See also
- Functions
- ldap_bind
- ldap_modrdn2
- ldap_rename_ext
- ldap_rename_ext_s
- ldap_simple_bind
- Modifying a Directory Entry
Send comments about this topic to Microsoft
Build date: 10/26/2012