Click to Rate and Give Feedback
MSDN
MSDN Library
Directory Services
Extended Controls
 LDAP_SERVER_TREE_DELETE_OID Control...

  Switch on low bandwidth view
LDAP_SERVER_TREE_DELETE_OID Control Code

The LDAP_SERVER_TREE_DELETE_OID control is used with an extended LDAP delete function to delete an entire subtree in the directory.

To use this control, set the members of the LDAPControl structure as follows.

PWCHAR ldctl_oid = LDAP_SERVER_TREE_DELETE_OID;
struct berval ldctl_value = {0, NULL};
BOOLEAN ldctl_iscritical;

Members

ldctl_oid

LDAP_SERVER_TREE_DELETE_OID, which is defined as "1.2.840.113556.1.4.805".

ldctl_value

No data for this control. In the berval structure, set bv_len to zero and bv_val to NULL.

ldctl_iscritical

Can be TRUE or FALSE depending on whether the operation is critical to your application.

Remarks

The Tree Delete control is used with the extended delete functions, such as ldap_delete_ext, to delete an entire directory subtree. This control must be exclusively used with the LDAP DelRequest message and will be ignored if used otherwise. However, if the criticality field is set to TRUE and the control is used with other than the DelRequest message, the request will fail and return an LDAP_UNAVAILABLE_CRIT_EXTENSION error. Server authentication of proper user permissions before completing the operation is required.

Error Messages

Constant/valueDescription

InsufficientAccessRights (50)

The authenticated user does not possess the proper permissions to exercise this control.

UnwillingToPerform (53)

The server is not the authority for the selected tree or the container contains platform specific restraints against deletion.

AdminLimitExceeded (11)

The limit of the number of objects that can be deleted in one operation is exceeded. However, all objects processed up to the limit will be deleted. The DelRequest with the Tree Delete control may be resubmitted until a success response is received.

 

 

If a Tree Delete control request fails, it may be retried with no adverse effects.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderNtldap.h

See Also

Data Structures
LDAPMessage
Using Controls

Send comments about this topic to Microsoft

Build date: 7/7/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Limit of the number of objects that can be deleted in one operation...      Joe Richards - MVP   |   Edit   |   Show History
...is currently 16384 objects. Once that number is exceeded, you will need to execute an ldap_delete that uses this control in a loop to actually delete the entire branch.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker