MSMQManagement

 

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 MSMQManagement object represents the elements of the state of a queue that are common to both destination queues and outgoing queues. It can be used to do the following:

  • Initialize an MSMQManagement object to represent the state of a specific active destination queue or outgoing queue. A call to initialize an MSMQManagement object implicitly creates and initializes an MSMQQueueManagement object for a destination queue or an MSMQOutgoingQueueManagement object for an outgoing queue. These objects provide information that is specific to a destination queue or an outgoing queue, respectfully.

  • Obtain administrative information that is common to both destination and outgoing queues.

Methods

The MSMQManagement object defines the following method.

Method Description
MSMQManagement.Init Initializes an MSMQManagement object to represent the state of a specific active destination queue or outgoing queue, and then implicitly creates and initializes an MSMQQueueManagement object for a destination queue or an MSMQOutgoingQueueManagement object for an outgoing queue.

Properties

The MSMQManagement object defines the following properties.

Property Description
MSMQManagement.BytesInQueue Returns the number of message bytes in the destination queue or outgoing queue.

Run-time access: Read-only

Data type: Variant
MSMQManagement.ForeignStatus Returns a flag that indicates whether a destination queue is a foreign queue or whether an outgoing queue is associated with a foreign queue.

Run-time access: Read-only

Data type: Long
MSMQManagement.FormatName Returns a format name for the queue.

Run-time access: Read-only

Data type: String
MSMQManagement.IsLocal Returns a Boolean value that indicates whether the queue resides on the local computer or a remote computer.

Run-time access: Read-only

Data type: Boolean
MSMQManagement.Machine Returns the name of the computer where the queue resides.

Run-time access: Read-only

Data type: String
MSMQManagement.MessageCount Returns the number of messages in the queue.

Run-time access: Read-only

Data type: Long
MSMQManagement.QueueType Returns a flag that indicates one of several queue types.

Run-time access: Read-only

Data type: Long
MSMQManagement.TransactionalStatus Returns a flag that indicates whether a destination queue is or is not a transactional queue or whether an outgoing queue is associated with a transactional queue or with a nontransactional queue.

Run-time access: Read-only

Data type: Long

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

Message Queuing COM Components