3.1.5.3.2 DeleteObject Method (Opnum 7)
The DeleteObject method executes an LDAP command to delete an Active Directory object that has a specified distinguished name and attributes. The command MUST be executed under the machine security credentials, or for a cluster, under the specified network name credentials.<54>
-
HRESULT DeleteObject( [in] BSTR domainControllerName, [in] BSTR distinguishedName, [in] BSTR networkNameResourceName );
domainControllerName: MUST be the FQDN of the domain controller to which the method sends the LDAP request.
distinguishedName: MUST be the distinguished name of the Active Directory object that is being deleted. The distinguished name of any object in Active Directory MAY be used. The format of the distinguished name is specified in [RFC2251] section 4.1.3. <55>
networkNameResourceName: MUST be the name of the cluster resource (the resource type MUST be "Network Name"). If this parameter is a non-empty string, the server MUST execute the LDAP command under the account that corresponds to this network name. There are no constraints regarding the format of the network name except the requirement that its length be no more than 32,767 characters. Otherwise, if this parameter is NULL or an empty string, the server MUST use the machine account to execute the LDAP command.
Return Values: The method MUST return:
A value of 0 on success.
For LDAP protocol failures:
A value of dfsrHelperLdapErrorBase + the server-side error code if the LDAP error is LDAP_OPERATIONS_ERROR.
A value of 0 if the LDAP error is LDAP_NO_SUCH_OBJECT.
A value of dfsrHelperLdapErrorBase plus the LDAP return code for all other LDAP errors. For more information, see [LDAP-ERR].
For all other failures, an implementation-specific nonzero error code.
The server MUST handle this message by using the same sequence of steps as for IADProxy::DeleteObject (as specified in section 3.1.5.2.2), with the following additional step:
The server MUST execute the LDAP command under the credentials that correspond to the network resource name that is supplied in the networkNameResourceName parameter.