3.1.4.5 S_DSDeleteObject (Opnum 1)

This method deletes a directory object specified by a directory service pathname.

 HRESULT S_DSDeleteObject(
   [in] handle_t hBind,
   [in, range(1,58)] unsigned long dwObjectType,
   [in] const wchar_t* pwcsPathName
 );

hBind:  MUST specify an RPC binding handle, as specified in [MS-RPCE] section 2.

dwObjectType:  Specifies the type of object to delete. MUST be set to one of the directory object types specified in section 2.2.8.

pwcsPathName: Pointer to a NULL-terminated 16-bit Unicode string that MUST contain the directory service pathname, as specified in section 2.2.9, to the object in the directory service.

Return Values:  If the method succeeds, the return value is 0. If the method fails, the return value is an implementation-specific error code.

MQ_OK (0x00000000)

MQ_ERROR_INVALID_PARAMETER (0xC00E0006)

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE].

The server SHOULD enforce appropriate security measures to make sure that the caller has the required permissions to execute this routine. If the server enforces security measures, and the caller does not have the required credentials, the server MUST return an error.

When processing this call, the server MUST:

  • The server MAY<34> forward the delete to another server.

  • Generate the Remove Object from Directory (section 3.1.6.13) event with the following arguments:

    • iObjectType := dwObjectType

    • iPathName := pwcsPathName

    • iGuid := NULL

  • If rStatus returned by the event is not 0x00000000, return rStatus and take no further action.

  • The server MAY<35> contact other servers to propagate the changes.