ldap_delete

Asynchronously deletes the specified entry.

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_delete (
     LDAP           *ld,
     const char     *dn);
  
  

Parameters

ld

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

dn

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

Return Values

>0

Message ID of operation

-1

Failure

Remarks

The entry specified for the delete must be a leaf entry. If the entry has children, the delete will fail. LDAP does not support the deletion of a subtree in a single operation.

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

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

See Also

ldap_delete_s, ldap_delete_ext, ldap_delete_ext_s