Platform SDK: Active Directory, ADSI, and Directory Services

ldap_delete_ext

The ldap_delete_ext function is an extended routine that removes a leaf entry from the directory tree.

ULONG ldap_delete_ext(
  LDAP* ld,
  PCHAR dn,
  PLDAPControl* ServerControls,
  PLDAPControl* ClientControls,
  ULONG* MessageNumber
);

Parameters

ld
[in] The session handle.
dn
[in] The distinguished name of the entry to delete.
ServerControls
[in] List of LDAP server controls.
ClientControls
[in] List of client controls.
MessageNumber
[out] The message ID for the request.

Return Values

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

The ldap_delete_ext function removes a leaf entry from the directory tree. (Note that LDAP does not support deletion of entire subtrees in a single operation.)

The parameters and effects of ldap_delete_ext subsume those of ldap_delete. The extended routine includes additional parameters to support client and server controls and thread safety.

If the operation succeeds, ldap_delete_ext passes the message ID to the caller as a parameter when the operation returns successfully. Call ldap_result with the message ID to get the result of the operation.

If you prefer to have the function return the results directly, use the synchronous routine ldap_delete_ext_s.

Multithreading: Calls to ldap_delete_ext are thread-safe.

Requirements

  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.

See Also

Functions, ldap_delete, ldap_delete_ext_s, ldap_result, Modifying a Directory Entry, Return Values