<div class="content"><p>The Update method is received by the server in an
RPC_REQUEST packet. In response, the server updates the directory or the local
QueueManager with the current values of the <a href="d22779e5-7d4d-4711-bdf0-3d47adb6c5df" data-linktype="relative-path">MSMQQueueInfo</a> object&#39;s
properties.</p><dl>
<dd>
<div><pre> HRESULT Update();
</pre></div>
</dd></dl><p>This method has no parameters.</p><p><b>Return Values: </b>The method MUST return S_OK
(0x00000000) on success or an implementation-specific error <a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a>
on failure.</p><p>When processing this call, the server MUST abide by the
following contract:</p><ul><li><p><span><span> 
</span></span>Generate <a href="9bc1500e-4141-4d00-a55b-7b5506b9a372" data-linktype="relative-path">Update
QueueFormatName</a> event (section 3.10.6.1).</p>
</li><li><p><span><span> 
</span></span>If <i>rStatus</i> is an error HRESULT return an error HRESULT,
and take no further action.</p>
</li><li><p><span><span> 
</span></span>If the <i>QueueFormatName</i> instance variable is NULL:</p>
<ul><li><p><span><span>  </span></span>Return
an error HRESULT, and take no further action.</p>
</li></ul></li><li><p><span><span> 
</span></span>If the <i>QueueFormatName</i> instance variable identifies more
than one queue or contains an HTTP or a multicast <a href="3b7be3f7-651c-4f9c-930b-a9a7c4355ad8#gt_390ae273-7109-44eb-981f-aa157e6b37c0" data-linktype="relative-path">format name</a>:</p>
<ul><li><p><span><span>  </span></span>Return
an error HRESULT, and take no further action.</p>
</li></ul></li><li><p><span><span> 
</span></span>Define <i>IsLocal</i> as a <a href="../ms-dtyp/51bbfbb1-08e2-4c13-a95e-1eaa7d310670" data-linktype="relative-path">BOOLEAN</a>
value that equals True if the <a href="7d8d0dab-699c-4121-9ee4-226a2dbced2e" data-linktype="relative-path">ApplicationQueue</a> that is
identified by the <i>QueueFormatName</i> instance variable belongs to the
QueueCollection of the local QueueManager. Otherwise, <i>IsLocal</i> equals
False.</p>
</li><li><p><span><span> 
</span></span>Define <i>IsPublic</i> as a BOOLEAN value that equals True if the
<i>QueueFormatName</i> instance variable identifies a <a href="3b7be3f7-651c-4f9c-930b-a9a7c4355ad8#gt_bb49bace-e853-4c7a-b4ab-59f1097c3dc8" data-linktype="relative-path">public queue</a>. Otherwise, <i>IsPublic</i>
equals False.</p>
</li><li><p><span><span> 
</span></span>If <i>IsLocal</i> equals False and <i>IsPublic</i> equals False:</p>
<ul><li><p><span><span>  </span></span>Return
an error HRESULT, and take no further action.</p>
</li></ul></li><li><p><span><span> 
</span></span>Look up the ApplicationQueue that is identified by the <i>QueueFormatName</i>
instance variable.</p>
<ul><li><p><span><span>  </span></span>If
ApplicationQueue exists:</p>
<ul><li><p><span><span> 
</span></span>Update the identified properties of the ApplicationQueue with the
instance variables of the MSMQQueueInfo object, according to the mappings
described in the abstract data model for this object.</p>
</li><li><p><span><span> 
</span></span>If <i>IsPublic</i> equals True:</p>
<ul><li><p><span><span> 
</span></span>Generate the <a href="../ms-mqdmpr/04b08a30-a6d8-43bb-b282-3b089bec1ffe" data-linktype="relative-path">Write
Directory</a> (<a href="../ms-mqdmpr/5eafe0a6-a22f-436b-a0d9-4cbc25c52b47" data-linktype="relative-path">[MS-MQDMPR]</a>
section 3.1.7.1.24) event with the following arguments:</p>
<ul><li><p><span><span> 
</span></span><i>iDirectoryObject</i> = Queue</p>
</li><li><p><span><span> 
</span></span><i>iAttributeList</i> = An array of the following
attribute-filter expressions:</p>
<ul><li><p><span><span> 
</span></span>&#34;Identifier&#34; EQUALS ApplicationQueue.<b>Identifier</b></p>
</li></ul></li><li><p><span><span> 
</span></span>If the query results with returned rStatus not Success:</p>
<ul><li><p><span><span> 
</span></span>Return an error HRESULT, and take no further action.</p>
</li></ul></li></ul></li></ul></li><li><p><span><span> 
</span></span>Else:</p>
<ul><li><p><span><span> 
</span></span>Return an error HRESULT, and take no further action.</p>
</li></ul></li></ul></li><li><p><span><span>  </span></span>Else:</p>
<ul><li><p><span><span> 
</span></span>Return an error HRESULT, and take no further action.</p>
</li></ul></li></ul></li><li><p><span><span> 
</span></span>Return S_OK (0x00000000), and take no further action.</p>
</li></ul></div>