<div class="content"><p> </p><p>This method returns the properties associated with a
directory object specified by a <span><a href="993fa29f-3deb-494f-b4b4-492ee945735f#gt_c36db657-3138-4d9a-9289-ded5cbb8b40e" data-linktype="relative-path">directory service</a></span>
pathname.</p><dl>
<dd>
<div><pre> HRESULT S_DSGetProps(
   [in] handle_t hBind,
   [in, range(1,58)] unsigned long dwObjectType,
   [in] const wchar_t* pwcsPathName,
   [in, range(1,128)] unsigned long cp,
   [in, size_is(cp)] unsigned long aProp[],
   [in, out, size_is(cp)] PROPVARIANT apVar[],
   [in] PCONTEXT_HANDLE_SERVER_AUTH_TYPE phServerAuth,
   [out, size_is(*pdwServerSignatureSize)] 
     unsigned char* pbServerSignature,
   [in, out] LPBOUNDED_SIGNATURE_SIZE pdwServerSignatureSize
 );
</pre></div>
</dd></dl><p><b>hBind: </b> MUST specify an <span><a href="993fa29f-3deb-494f-b4b4-492ee945735f#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> binding handle,
as specified in <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>
section <span><a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a></span>.</p><p><b>dwObjectType: </b> Specifies the type of object for which
properties are to be retrieved. MUST be set to one of the object types
specified in section <span><a href="0d63e0e1-8b17-4103-9080-01e6c7c9f61f" data-linktype="relative-path">2.2.8</a></span>.</p><p><b>pwcsPathName: </b> Pointer to a NULL-terminated 16-bit <span><a href="993fa29f-3deb-494f-b4b4-492ee945735f#gt_b069acb4-e364-453e-ac83-42d469bb339e" data-linktype="relative-path">Unicode
string</a></span> that MUST contain the directory service pathname, as
specified in section <span><a href="6e03fb44-a705-4728-acca-7c6d7b8d7396" data-linktype="relative-path">2.2.9</a></span>, to the
object in the directory service.</p><p><b>cp: </b> MUST be set to the size (in elements) of the
arrays <i>aProp</i> and <i>apVar</i>. The arrays <i>aProp</i> and <i>apVar</i>
MUST have an identical number of elements and MUST contain at least one
element.</p><p><b>aProp: </b> An array of <span><a href="993fa29f-3deb-494f-b4b4-492ee945735f#gt_382ac1cd-8ff9-493a-bfec-d9ad08955707" data-linktype="relative-path">property identifiers</a></span>
specifying the set of object properties to be returned. Each element MUST
specify a value from the property identifiers table defined in section <span><a href="1f12668a-2fa3-45cf-8236-74f0fe4a6b7d" data-linktype="relative-path">2.2.10.1</a></span>
for the object type specified in <i>dwObjectType</i>. Each element MUST specify
the property identifier for the corresponding property value at the same
element index in <i>apVar</i>. The array MUST contain at least one element.</p><p><b>apVar: </b>On input, each element MUST be initialized to
the appropriate <b>VARTYPE</b> (<span><a href="../ms-mqmq/b7cc2590-a617-45df-b6a3-1f31102b36fb" data-linktype="relative-path">[MS-MQMQ]</a></span>
section <span><a href="../ms-mqmq/7ebd137c-ce66-49d6-b90e-22560f9155e5" data-linktype="relative-path">2.2.12.1</a></span>)
for the associated property specified by the same element in <i>aProp</i>, or
VT_NULL. On success, the server MUST populate the elements of this array with
property values for the properties identified by the corresponding elements of <i>aProp</i>.
The array MUST contain at least one element.</p><p><b>phServerAuth: </b> A <span><a href="c28a1e6b-4092-4443-b69f-5814d5c4f9e4" data-linktype="relative-path">PCONTEXT_HANDLE_SERVER_AUTH_TYPE</a></span>
RPC context handle acquired from the <i>pphServerAuth</i> parameter in a
previous call to <span><a href="0e3ad7d0-6a64-480a-9f13-e94dd608d79d" data-linktype="relative-path">S_DSValidateServer</a></span>.
The server MUST use this parameter as a key to locate the GSS security context
used to compute the signature returned in <i>pbServerSignature</i>. See section
3.1.4.2.</p><p><b>pbServerSignature: </b>Contains a signed hash over the
returned property values.</p><p><b>pdwServerSignatureSize: </b>Contains the maximum length
in bytes of the server signature to return.</p><p><b>Return Values: </b>On success, this method MUST return
MQ_OK (0x00000000); otherwise, the server MUST return a failure <span><a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a></span>.
Additionally, if a failure HRESULT is returned, the client MUST disregard all
out-parameter values.</p><p><b>MQ_OK</b> (0x00000000)</p><p><b>MQ_ERROR_USER_BUFFER_TOO_SMALL</b> (0xC00E0028)</p><p><b>MQ_ERROR_INVALID_PARAMETER</b> (0xC00E0006)</p><p><b>MQ_ERROR_ILLEGAL_PROPID</b> (0xC00E0039)</p><p><b>MQ_ERROR</b> (0xC00E0001)</p><p><b>MQ_ERROR_DS_ERROR</b> (0xC00E0043)</p><p><b>MQDS_OBJECT_NOT_FOUND</b> (0xC00E050F)</p><p><b>E_ADS_PROPERTY_NOT_FOUND</b> (0x8000500D)</p><p><b>Exceptions Thrown:</b> No exceptions are thrown beyond
those thrown by the underlying RPC protocol, as specified in [MS-RPCE].</p><p>When processing this call the server MUST:</p><ul><li><p><span><span> 
</span></span>Verify that each of the <i>aProp</i> and <i>apVar</i> arrays
contains at least one element. If not, the server SHOULD<a id="Appendix_A_Target_38"></a><a aria-label="Product behavior note 38" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_38" data-linktype="relative-path">&lt;38&gt;</a> return an error.</p>
</li><li><p><span><span> 
</span></span>Verify for each property identifier in <i>aProp</i>, that the
property identifier is valid for the object type specified in <i>dwObjectType</i>
as specified in the tables in section 2.2.10.1.</p>
</li><li><p><span><span> 
</span></span>Return an error code if the property identifier is not valid for
the object type specified in <i>dwObjectType</i>.</p>
</li><li><p><span><span> 
</span></span>Determine if each element of <i>apVar</i> is set to VT_NULL or to
the appropriate <b>VARTYPE</b> for the corresponding property identifier at the
same element index in <i>aProp</i>. If not, return an error code.</p>
</li><li><p><span><span> 
</span></span>Let <i>dirObject</i> be a directory object and initialized to
NULL.</p>
</li><li><p><span><span> 
</span></span>Generate a <span><a href="5c5b8c07-fef2-4e03-ba2d-7e6fc6527d6e" data-linktype="relative-path">Get Directory
Object (section 3.1.6.12)</a></span> event with the following
arguments:</p>
<ul><li><p><span><span>  </span></span><i>iObjectType</i>
:= <i>dwObjectType</i>.</p>
</li><li><p><span><span>  </span></span><i>iPathName</i>
:= <i>pwcsPathName</i>.</p>
</li><li><p><span><span>  </span></span><i>iGuid</i>
:= NULL.</p>
</li></ul></li><li><p><span><span> 
</span></span>If <i>rStatus</i> returned by the event is not 0x00000000, return
<i>rStatus</i> and take no further action; otherwise, set <i>dirObject</i> to
the returned <i>rObject</i>.</p>
</li><li><p><span><span> 
</span></span>For each element of the <i>apVar</i> array whose <b>vt</b> field
is VT_NULL, set the <b>vt</b> field to the appropriate <b>VARTYPE</b> for the
corresponding property identifier at the same element index in the <i>aProp</i>
array.</p>
</li><li><p><span><span> 
</span></span>For each element in the <i>aProp</i> array, populate the
corresponding element of the <i>apVar</i> array from <i>dirObject</i> according
to the rules defined in the following table. If any of the <i>aProp</i> elements
is not present in the rules, return an error HRESULT.<a id="Appendix_A_Target_39"></a><a aria-label="Product behavior note 39" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_39" data-linktype="relative-path">&lt;39&gt;</a> If no properties are specified
in <i>aProp</i>, the server SHOULD<a id="Appendix_A_Target_40"></a><a aria-label="Product behavior note 40" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_40" data-linktype="relative-path">&lt;40&gt;</a> return
MQ_ERROR_INVALID_PARAMETER (0xC00E0006). If any property in <i>aProp</i> is a <span><a href="993fa29f-3deb-494f-b4b4-492ee945735f#gt_c7c52d99-72e6-42b7-9b8f-84276d320cee" data-linktype="relative-path">private
property</a></span>, the server MUST return MQ_ERROR_ILLEGAL_PROPID
(0xC00E0039).</p>
<table><thead>
  <tr>
   <th>
   <p>Value of dwObjectType</p>
   </th>
   <th>
   <p>Rules</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>MQDS_QUEUE</p>
  </td>
  <td>
  <p>See section <span><a href="8cad50a9-0727-446f-983e-526b1c39488c" data-linktype="relative-path">3.1.4.21.8.1.4</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>MQDS_MACHINE</p>
  </td>
  <td>
  <p>See section <span><a href="9cadc21b-4380-4ca4-88cc-9675e5b8de52" data-linktype="relative-path">3.1.4.21.8.1.1</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>MQDS_SITE</p>
  </td>
  <td>
  <p>See section <span><a href="a0c26666-8fe4-4857-be84-0148244205d0" data-linktype="relative-path">3.1.4.21.8.1.8</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>MQDS_CN</p>
  </td>
  <td>
  <p>See section <span><a href="019fd145-2b1e-4384-bc4e-a56291af3757" data-linktype="relative-path">3.1.4.21.8.1.10</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>MQDS_ENTERPRISE</p>
  </td>
  <td>
  <p>See section <span><a href="9f43e08c-b5b8-4946-99bb-b0b74bb3e553" data-linktype="relative-path">3.1.4.21.8.1.6</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>MQDS_ROUTINGLINK</p>
  </td>
  <td>
  <p>See section <span><a href="93678d5f-bb0e-4af6-8dfa-4e066dcbe639" data-linktype="relative-path">3.1.4.21.8.1.9</a></span></p>
  </td>
 </tr></tbody></table>
</li><li><p><span><span> 
</span></span>Construct the <i>pbServerSignature</i> parameter by creating a
hash by using the <span><a href="993fa29f-3deb-494f-b4b4-492ee945735f#gt_1535fdac-8d46-4605-96af-252907c4a593" data-linktype="relative-path">MD5</a></span> algorithm, as
specified in <span><a href="https://go.microsoft.com/fwlink/?LinkId=90275" data-linktype="external">[RFC1321]</a></span>, and
sealing it, as specified by the following pseudocode:</p>
<div><pre> Initialize an MD5 hash context
  
 Add to the hash context the DWORD data value representing the count 
    of properties to be returned (from parameter cp).
  
 FOR each property returned in apVar
  
  Add to the hash context the DWORD value of the property 
    identifier (from aProp[])
  
  Add to the hash context the type-specific data value of the 
     property (from apVar[]). The data value and length are 
     defined by the variant type of the property (apVar[].vt)
 ENDFOR
  
 Call GSS_Wrap using the token from output context handle from the 
 GSS security context and the computed MD5 hash
  
 Set pbServerSignature to the wrapped MD5 hash
  
 Set *pdwServerSignatureSize to the size of the wrapped MD5 hash
  
</pre></div>
</li><li><p><span><span> 
</span></span>MUST set the <i>pdwServerSignatureSize</i> parameter to the
actual length in bytes of the server signature on output. If the server
signature is larger than the supplied buffer, the server MUST return
MQ_ERROR_USER_BUFFER_TOO_SMALL (0xC00E0028).</p>
</li></ul></div>