3.3.4.1.9 BytesInQueue (Opnum 15)

The BytesInQueue method is received by the server in an RPC_REQUEST packet. In response, the server MUST return the value of the represented Queue.TotalBytes property.

 [propget] HRESULT BytesInQueue(
   [out, retval] VARIANT* pvBytesInQueue
 );

pvBytesInQueue: A pointer to a VARIANT that, when successfully completed, contains an unsigned 64-bit integer (VT_UI8) that specifies, in bytes, the amount of data in the represented Queue.

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

When the server processes this call, it MUST follow these guidelines:

  • If the ObjectIsInitialized instance variable is False:

    • The server MUST return MQ_ERROR_UNINITIALIZED_OBJECT (0xC00E0094), and MUST take no further action.

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

    • iPropID = PROPID_MGMT_QUEUE_BYTES_IN_ QUEUE

    • If the rStatus return value is not equal to MQ_OK (0x00000000), the server MUST return rStatus and MUST take no further action.

    • Else:

      • The pvBytesInQueue output variable MUST be set to the value of the returned rPropVar.