次の方法で共有


ldap_delete (Windows Embedded CE 6.0)

1/6/2010

This function deletes an entry from the directory tree.

Syntax

ULONG ldap_delete(
  LDAP* ld,
  UNICODE PTCHAR dn
);

Parameters

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

Return Value

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 this function 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_extor 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

Header winldap.h
Library wldap32.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

LDAP Directory Entry Functions
ldap_abandon
ldap_bind
ldap_delete_ext
ldap_delete_ext_s
ldap_delete_s
ldap_result
ldap_simple_bind
LDAPSortKey
LDAP