ldap_modify

Asynchronously modifies the specified entry on the LDAP server.

LDAP Version:v2 or higher
Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  int ldap_modify (
     LDAP         *ld,
     const char   *dn,
     LDAPMod     **mods);
  
  

Parameters

ld

(IN) Points to the handle for the LDAP session.

dn

(IN) Points to the distinguished name of the entry to modify.

mods

(IN) Points to a NULL-terminated array of pointers to the modifications to make to the entry. Each LDAPMod structure contains the modifications for one attribute.

Return Values

>0

Message ID of operation

-1

Failure

Remarks

To obtain the results of the operation, call the ldap_result function with the returned message ID.

If the ldap_modify function returns -1, check the LDAP_OPT_RESULT_CODE option in the LDAP handle for the error code.

To free the memory used by the LDAPMod structures, call the ldap_mods_free function.

Use the ldap_rename or ldap_rename_s function to modify the entry's name.

See Also

ldap_modify_s, ldap_modify_ext, ldap_modify_ext_s, ldap_rename, ldap_rename_s