3.10.4.1.30 Update (Opnum 36)

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 MSMQQueueInfo object's properties.

 HRESULT Update();

This method has no parameters.

Return Values: The method MUST return S_OK (0x00000000) on success or an implementation-specific error HRESULT on failure.

When processing this call, the server MUST abide by the following contract:

  • Generate Update QueueFormatName event (section 3.10.6.1).

  • If rStatus is an error HRESULT return an error HRESULT, and take no further action.

  • If the QueueFormatName instance variable is NULL:

    • Return an error HRESULT, and take no further action.

  • If the QueueFormatName instance variable identifies more than one queue or contains an HTTP or a multicast format name:

    • Return an error HRESULT, and take no further action.

  • Define IsLocal as a BOOLEAN value that equals True if the ApplicationQueue that is identified by the QueueFormatName instance variable belongs to the QueueCollection of the local QueueManager. Otherwise, IsLocal equals False.

  • Define IsPublic as a BOOLEAN value that equals True if the QueueFormatName instance variable identifies a public queue. Otherwise, IsPublic equals False.

  • If IsLocal equals False and IsPublic equals False:

    • Return an error HRESULT, and take no further action.

  • Look up the ApplicationQueue that is identified by the QueueFormatName instance variable.

    • If ApplicationQueue exists:

      • 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.

      • If IsPublic equals True:

        • Generate the Write Directory ([MS-MQDMPR] section 3.1.7.1.24) event with the following arguments:

          • iDirectoryObject = Queue

          • iAttributeList = An array of the following attribute-filter expressions:

            • "Identifier" EQUALS ApplicationQueue.Identifier

          • If the query results with returned rStatus not Success:

            • Return an error HRESULT, and take no further action.

      • Else:

        • Return an error HRESULT, and take no further action.

    • Else:

      • Return an error HRESULT, and take no further action.

  • Return S_OK (0x00000000), and take no further action.