다음을 통해 공유


MSMQApplication.ActiveQueues

 

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

(Introduced in MSMQ 3.0.) The ActiveQueues property of the MSMQApplication object returns a Variant containing an array of variants containing strings that specify the format names of all active queues on the computer.

Data type: Variant (array of variants)
Run-time access: Read-only
Property ActiveQueues As Variant  

Property Value

A Variant containing an array of variants containing strings that specify format names for all the active queues.

Error Codes

For information on return codes, see Message Queuing Error and Information Codes.

Remarks

Including the MSMQApplication object in the Visual Basic® code syntax is optional because this object is defined as the application object, whose methods and properties are globally available.

Active queues include the following queues.

  • Local private and public queues that contain messages.

  • Local queues for which an application has a handle open (or had a handle recently).

  • Local outgoing queues that have messages for remote destination queues.

This property (by default) applies to the local computer. To obtain information on the active queues on a remote computer, set MSMQApplication.Machine to the name of the remote computer and then look at this property.

The outgoing queues included in the list of active queues on a specific computer returned by ActiveQueues can be identified by examining the value returned by MSMQManagement.IsLocal for each queue in the list. Because the format name of an outgoing queue is the format name of the corresponding destination queue, the value returned by MSMQManagement.IsLocal for an active outgoing queue is determined by the location of the corresponding destination queue, which resides on a different computer. If the MSMQManagement object is initialized to refer to the same computer as the MSMQApplication object, this queue will be identified as a remote queue.

In C++ COM applications, you must use a smart pointer to the IMSMQApplication3 interface to expose the ActiveQueues property.

Equivalent API Function Property

When using API functions, the equivalent property is PROPID_MGMT_MSMQ_ACTIVEQUEUES.

Requirements

Windows NT/2000/XP: Included in Windows XP and Windows Server 2003.

Windows 95/98/Me: Unsupported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQApplication
MSMQApplication.Machine
MSMQManagement
MSMQManagement.IsLocal