Partager via


MSMQQueue.QueueInfo

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The QueueInfo property of the MSMQQueue object retrieves the stored settings of the MSMQQueueInfo object used to open the queue.

Data type: MSMQQueueInfo
Run-time access: Read-only
Property QueueInfo As MSMQQueueInfo  

Property Value

An MSMQQueueInfo object containing the settings of the MSMQQueueInfo object that was used to open the queue (in C++, a smart pointer to the IMSMQQueueInfo interface).

Remarks

The QueueInfo property is used to access the settings of the MSMQQueueInfo object that were used to open the queue. These settings are stored in the directory service for public queues, and on the local computer for private queues.

This property is very useful when you want access the settings of the MSMQQueueInfo object after the MSMQQueue object has been passed as a argument to another function or routine.

Note

The MSMQQueueInfo object used to open the queue and the MSMQQueueInfo object returned by the QueueInfo property are two separate instances that both represent the same queue.

Example Code

The following code fragment shows how to open a queue for receiving messages and to retrieve the QueueInfo property of the open queue as an MSMQQueueInfo object having the properties of the MSMQQueueInfo object that was used to open the queue.

Dim qinfo1 As New MSMQQueueInfo  
Dim qinfo2 As MSMQQueueInfo  
Dim q As MSMQQueue  
qinfo1.PathName = ".\PRIVATE$\MyQueue"  
Set q = qinfo1.Open
(MQ_RECEIVE_ACCESS, MQ_DENY_NONE)  
Set qinfo2 = q.QueueInfo  

Requirements

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQQueue
MSMQQueue.Close
MSMQQueueInfo
MSMQQueueInfo.Create
MSMQQueueInfo.Label
MSMQQueueInfo.Open
MSMQQueueInfo.QueueGuid
MSMQQueueInfo.PathName