3.10.3 Initialization
The MSMQQueueInfo class can be constructed and initialized either by the client or by calling IMSMQQuery4::LookupQueue or IMSMQQuery4::LookupQueue_v2.
When IMSMQQuery4::LookupQueue or IMSMQQuery4::LookupQueue_v2 is called, the MSMQQuery object returns an MSMQQueueInfos collection that initializes the MSMQQueueInfo object instances on demand when the client iterates over the collection.
When the client constructs the object, the instance variables are set with the following default values.
Instance variable
Default value
refQueue
An empty Queue ([MS-MQDMPR] section 3.1.1.2) ADM element instance.
QueueFormatName
NULL
IsRefreshed
FALSE
IsApplicationQueue
FALSE
IsQueueCreated
FALSE
refQueue MUST be further initialized by generating the Set Queue Defaults event ([MS-MQDMPR] section 3.1.7.1.33) with the following argument:
iQueue := refQueue
The value of the IsRefreshed instance variable is set to TRUE when the MSMQQueueInfo::Refresh method is called. The value of the IsQueueCreated instance variable is set to TRUE when the Create method is called. In either of the two cases, if the Queue is an ApplicationQueue, the value of the IsApplicationQueue instance variable is set to TRUE.
If the client constructed the MSMQQueueInfo object to create an ApplicationQueue:
The client MUST call put IMSMQQueueInfo4::PathName before calling IMSMQQueueInfo4::Create.
If the client constructed the MSMQQueueInfo object to open, refresh/update, or delete a Queue:
The client MUST call put IMSMQQueueInfo4::PathName or put IMSMQQueueInfo4::FormatName before calling IMSMQQueueInfo4::Open, IMSMQQueueInfo4::Refresh, IMSMQQueueInfo4::Update, or IMSMQQueueInfo4::Delete.