3.3.4.1.5 ForeignStatus (Opnum 11)
The ForeignStatus method is received by the server in an RPC_REQUEST packet. In response, the server MUST return an enumerated value to indicate whether a Queue is a foreign queue or an OutgoingQueue that transfers messages to a foreign queue.
-
[propget] HRESULT ForeignStatus( [out, retval] long* plForeignStatus );
plForeignStatus: A pointer to a long that corresponds to the FOREIGN_STATUS enumeration as defined in the following table.
-
Value
Meaning
MQ_STATUS_FOREIGN
0x00000000
The represented Queue is a foreign queue, or an OutgoingQueue that transfers to a foreign queue.
MQ_STATUS_NOT_FOREIGN
0x00000001
The represented Queue is not a foreign queue, or an OutgoingQueue that transfers to a foreign queue.
STATUS_UNKNOWN
0x00000002
The message queuing system is unable to determine whether the represented Queue is a foreign 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_FOREIGN
If the rStatus return value is not equal to MQ_OK (0x00000000), the server MUST return rStatus and MUST take no further action.
Else:
If the value of the returned rPropVar was "Yes":
The pIForeignStatus output variable MUST be set to MQ_STATUS_FOREIGN, and the server MUST take no further action.
If the value of the returned rPropVar was "No":
The pIForeignStatus output variable MUST be set to MQ_STATUS_NOT_FOREIGN, and the server MUST take no further action.
If the value of the returned rPropVar was "Unknown":
The pIForeignStatus output variable MUST be set to MQ_STATUS_UNKNOWN, and the server MUST take no further action.