Compartilhar via


ldap_delete (Windows CE 5.0)

Send Feedback

This function deletes an entry from the directory tree.

ULONG ldap_delete(LDAP* ld,UNICODE PTCHARdn);

Parameters

  • ld
    [in] Session handle.
  • dn
    [in] Distinguished name of the entry to delete.

Return Values

If this function succeeds, it returns the message identifier of the delete operation.

If this function fails, the return value is –1 and the function sets the session error parameters in the LDAP data structure.

Remarks

Call thisfunction to remove a leaf entry from the directory tree.

Note   LDAP does not support deletion of entire subtrees in a single operation.

As an asynchronous function, this function returns a message identifier for the operation. Call the ldap_result function with the message identifier to get the result of the operation. To cancel an asynchronous delete operation before it has completed, call the ldap_abandon function.

If you prefer to have the function return the results directly, use the synchronous routine ldap_delete_s. Use ldap_delete_ext or ldap_delete_ext_s if you need support for LDAP 3 server and client controls.

In a multithreading environment, calls to ldap_delete are not thread-safe because the function returns a message identifier rather than the return code. To determine whether the call returned an error value, you have to retrieve the return code from the connection block. It is possible for another thread to overwrite the return code before you retrieve it. Use ldap_delete_ext or ldap_delete_ext_s, both of which are thread-safe.

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Winldap.h.
Link Library: Wldap32.lib.

See Also

ldap_abandon | ldap_bind | ldap_delete_ext | ldap_delete_ext_s | ldap_delete_s | ldap_result | ldap_simple_bind | LDAPSortKey | LDAP

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.