<div class="content"><p> </p><p>This method sets properties associated with a machine 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. This method is intended for use by a <span><a href="993fa29f-3deb-494f-b4b4-492ee945735f#gt_476f10ed-08f0-4887-b583-59d5cf909979" data-linktype="relative-path">queue manager</a></span> to
manipulate its own directory service object of type <span><a href="1f12668a-2fa3-45cf-8236-74f0fe4a6b7d" data-linktype="relative-path">MQDS_MACHINE</a></span>.
Client applications SHOULD NOT use this method.<a id="Appendix_A_Target_76"></a><a aria-label="Product behavior note 76" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_76" data-linktype="relative-path">&lt;76&gt;</a></p><dl>
<dd>
<div><pre> HRESULT S_DSQMSetMachineProperties(
   [in] handle_t hBind,
   [in] const wchar_t* pwcsPathName,
   [in, range(1,128)] unsigned long cp,
   [in, size_is(cp)] unsigned long aProp[],
   [in, size_is(cp)] PROPVARIANT apVar[],
   [in] unsigned long dwContext
 );
</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>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>, of a machine
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 identifiers of properties to
associate with the machine object. Each element MUST specify a value from the <span><a href="993fa29f-3deb-494f-b4b4-492ee945735f#gt_382ac1cd-8ff9-493a-bfec-d9ad08955707" data-linktype="relative-path">property
identifiers</a></span> table, as specified in section 2.2.10.1. 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> An array that specifies the property values
to associate with the machine object. Each element MUST specify the property
value for the corresponding property identifier at the same element index in <i>aProp</i>.
The array MUST contain at least one element.</p><p><b>dwContext: </b> MUST be set by the client to a value that
the client can use to correlate callbacks with the initial call to
S_DSQMSetMachineProperties. The server MUST supply this value in the <i>dwContext</i>
parameter in the related calls of the <span><a href="8d36745a-e958-47e8-8065-18991ac07e5b" data-linktype="relative-path">S_DSQMSetMachinePropertiesSignProc (section 3.2.4.1)</a></span>
callback method.</p><p><b>Return Values: </b> If the method succeeds, the return
value is 0. If the method fails, the return value is an implementation-specific
error code.</p><p><b>MQ_OK</b> (0x00000000)</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 extension protocol, as specified in
[MS-RPCE].</p><p>When processing this call, the server MUST:</p><ul><li><p><span><span> 
</span></span>The server MAY invoke the S_DSQMSetMachinePropertiesSignProc
callback method to authenticate the client.<a id="Appendix_A_Target_77"></a><a aria-label="Product behavior note 77" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_77" data-linktype="relative-path">&lt;77&gt;</a></p>
</li><li><p><span><span> 
</span></span>Verify that the arrays <i>aProp</i> and <i>apVar</i> contain at
least one element. If not, the server SHOULD<a id="Appendix_A_Target_78"></a><a aria-label="Product behavior note 78" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_78" data-linktype="relative-path">&lt;78&gt;</a> return an
error.</p>
</li><li><p><span><span> 
</span></span>The server MUST return an error code if the property identifier
is not valid for an object of type MQDS_MACHINE.<a id="Appendix_A_Target_79"></a><a aria-label="Product behavior note 79" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_79" data-linktype="relative-path">&lt;79&gt;</a></p>
</li><li><p><span><span> 
</span></span>The server MAY<a id="Appendix_A_Target_80"></a><a aria-label="Product behavior note 80" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_80" data-linktype="relative-path">&lt;80&gt;</a> forward
the update to another server.</p>
</li><li><p><span><span> 
</span></span>Determine if each element of <i>apVar</i> specifies the property
value for the corresponding property identifier at the same element index in <i>aProp</i>.</p>
</li><li><p><span><span> 
</span></span>Generate the <span><a href="d4ae6231-1485-4155-83e2-e6509b3ff5da" data-linktype="relative-path">Get Directory Object for
Update (section 3.1.6.14)</a></span> event with the following
arguments:</p>
<ul><li><p><span><span>  </span></span><i>iObjectType</i>
:= MQDS_MACHINE</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, save <i>rObject</i>,
referred to as <i>dirObject</i>.</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 according to the rules specified in section <span><a href="9cadc21b-4380-4ca4-88cc-9675e5b8de52" data-linktype="relative-path">3.1.4.21.8.1.1</a></span>
and add the ADM element attribute name to a list, referred to as <i>attrList</i>.
If any of the <i>aProp</i> elements is not present in the rules in section
3.1.4.21.8.1.1, return error <span><a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a></span>.<a id="Appendix_A_Target_81"></a><a aria-label="Product behavior note 81" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_81" data-linktype="relative-path">&lt;81&gt;</a></p>
</li><li><p><span><span> 
</span></span>Generate the <span><a href="2e861a2a-b45d-4268-8403-42e7b2a97a97" data-linktype="relative-path">Commit Directory Object
Update (section 3.1.6.15)</a></span> event with the arguments set to <i>dirObject</i>
and <i>attrList</i> respectively. If the event returns <b>DirectoryOperationResult</b>.<b>Success</b>,
set <i>rStatus</i> to 0x00000000; otherwise, set <i>rStatus</i> to a failure
HRESULT and take no further action.</p>
</li><li><p><span><span> 
</span></span>`The server MAY<a id="Appendix_A_Target_82"></a><a aria-label="Product behavior note 82" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_82" data-linktype="relative-path">&lt;82&gt;</a> contact
other servers to propagate the changes.</p>
</li><li><p><span><span> 
</span></span>If the <i>dirObject</i>.<b>Identifier</b> is different from the <b>LocalQueueManager</b>.<b>Identifier</b>,
the server MAY<a id="Appendix_A_Target_83"></a><a aria-label="Product behavior note 83" href="9c868bc8-426a-4e5f-8b45-cee7d49c3d10#Appendix_A_83" data-linktype="relative-path">&lt;83&gt;</a> do the following:</p>
<ul><li><p><span><span>  </span></span>Generate
a <span><a href="../ms-mqcn/be84743d-30a7-4fb2-8ec6-7d2443c23913" data-linktype="relative-path">Send Change
Notification</a></span> event as specified in <span><a href="../ms-mqcn/bacb4ae1-01e4-4eaa-8e1f-c30af0df1a7f" data-linktype="relative-path">[MS-MQCN]</a></span>
section 3.3.4.1 with the following arguments:</p>
<ul><li><p><span><span> 
</span></span><i>iOperation</i> := QueueManagerUpdate</p>
</li></ul></li></ul></li><li><p><span><span> 
</span></span><i>iDirectoryObject</i> := <i>dirObject</i></p>
</li></ul></div>