3.11.1.1 Object State Machine

The MSMQQueue object has two states: Opened, which is the initial state of the object when it is obtained by using the MSMQQueueInfo::Open method; and Closed.

MSMQQueue object states

Figure 2: MSMQQueue object states

Any call to any method in the object while it is in the Closed state MUST return MQ_ERROR_INVALID_HANDLE (0xC00E0007).