This method sets security properties for a directory object specified by a directory service pathname.

 HRESULT S_DSSetObjectSecurity(
   [in] handle_t hBind,
   [in, range(1,58)] unsigned long dwObjectType,
   [in] const wchar_t* pwcsPathName,
   [in] unsigned long SecurityInformation,
   [in, unique, size_is(nLength)] unsigned char* pSecurityDescriptor,
   [in, range(0,524288)] unsigned long nLength
 );

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

dwObjectType: Specifies the type of object for which security properties are to be set. MUST be one of the 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, of the object in the directory service.

SecurityInformation: MUST be set by the client to a bitwise mask specifying the information to set from the pSecurityDescriptor parameter. See the SecurityInformation parameter description in section 3.1.4.11. Information in the pSecurityDescriptor parameter not associated with bits set in this field MUST be ignored.

pSecurityDescriptor: MUST contain a pointer to a security descriptor, as specified in [MS-DTYP] section 2.4.6, or to an MQDS_PublicKey structure.<63> See the pSecurityDescriptor parameter description in section 3.1.4.11. Note that where 3.1.4.11 indicates that pSecurityDescriptor contains a BLOBHEADER followed by an RSAPUBKEY (section 2.2.18) structure, this method actually contains an MQDS_PublicKey structure, which is the same structure prefixed by a 4-byte length field.

nLength:  MUST be set by the client to the length in bytes of the pSecurityDescriptor buffer.

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

MQ_OK (0x00000000)

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

When processing this call, the server MUST: