3.2.4.3.5 BytesInAllQueues (Opnum 19)

The BytesInAllQueues method is received by the server in an RPC_REQUEST packet. In response, the server MUST return the number of message bytes that are currently stored in all Queues of the represented QueueManager.QueueCollection.

 [propget] HRESULT BytesInAllQueues(
   [out, retval] VARIANT* pvBytesInAllQueues
 );

pvBytesInAllQueues: A pointer to a VARIANT that, when successfully completed, contains a 64-bit integer (VT_I8) that specifies (in bytes) the amount of data stored in all Queues of the represented QueueManager.QueueCollection.

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

When processing this call, the server MUST follow these guidelines:

  • If the ComputerName instance variable is NULL:

    • Set the pvBytesInAllQueues output variable to the sum of all the Queue.TotalBytes of the. Local QueueManager.QueueCollection.

  • Else:

    • The server MUST generate a QMMgmt Get Info event with the following inputs:

      • iPropID = PROPID_MGMT_MSMQ_BYTES_IN_ALL_QUEUES

    • If the rStatus return value is not equal to MQ_OK (0x00000000), the server MUST return rStatus and MUST take no further action. Otherwise, the pvBytesInAllQueues output variable MUST be set to the value of the returned rPropVar.