Sdílet prostřednictvím


Message Queuing COM Object Model

 

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 object model described in the following illustrations provides functionality for sending messages to queues, reading messages in queues, and several more queue management features. The guiding principle in designing the Message Queuing COM objects is object model simplicity.

Objects Used to Send Messages

The following illustration shows two sets of objects that can be used to send messages to queues. The first set uses the MSMQDestination object (introduced in MSMQ 3.0) and can be used to send messages to one or more destination queues. Messages can be sent to multiple destination queues using distribution lists, multicast addresses, or multiple-element format names.

The second set uses an MSMQQueueInfo object and should be used only when writing sending applications using the MSMQ 1.0 or MSMQ 2.0 object libraries. The MSMQQueueInfo object can only reference a single destination queue.

<No Change>

For an example of how these objects can be defined in a sending application, see Sending Message Examples.

Objects Used to Read Messages

The following illustration shows the objects used to read messages from a destination queue.

Note

(The MSMQDestination object used to send messages cannot be used when reading messages from a queue.)

<No Change>

For an example of how these objects can be defined in a receiving application, see Reading Message Examples.

Objects Used to Locate Queues

The following objects can be used to locate an existing public queue for sending messages or reading messages. These objects can be used to obtain one or more MSMQQueueInfo objects that can then be used to open the queue for sending or reading messages.

<No Change>

For an example of how these objects can be used, see Locating Queue Examples.

Objects Used to Send or Read Messages Within a Transaction

Message Queuing provides the following objects for obtaining a transaction object for internal and external transactions. These objects must be defined with the other objects needed for sending and reading messages.

<No Change>

For an example of how these objects can be used, see Sending Messages in Transaction Examples.

Application Object

Message Queuing provides a single COM application object that can be used to monitor Message Queuing on a computer, retrieve the computer name and identifier, and register internal and external certificates used to authenticate messages.

<No Change>