Condividi tramite


MSMQMessage.DestinationQueueInfo

 

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 DestinationQueueInfo property of the MSMQMessage

object is set by Message Queuing when a message is sent. It specifies the destination queue of the message.

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

Property Value

An MSMQQueueInfo object that represents the destination queue for the message (in C++, a smart pointer to the IMSMQQueueInfo interface).

Remarks

To retrieve the DestinationQueueInfo property of the message, set the WantDestinationQueue argument of receive or peek methods to True. These methods include MSMQQueue.Peek, MSMQQueue.PeekCurrent, and MSMQQueue.PeekNext, MSMQQueue.Receive, MSMQQueue.ReceiveCurrent. For reasons of performance, the default setting of WantDestinationQueue is False.

DestinationQueueInfo is typically used when reading messages that have been sent to a queue other than its original destination queue. For example, you may want to know the original destination queue of the messages that Message Queuing has sent to a computer journal or dead-letter queue. In normal circumstances, you do not need this property because you typically read the message from its destination queue.

This property can also be used when sending response messages to a response queue. To provide the destination queue of a message in a response message, set the MSMQMessage.ResponseQueueInfo property of the response message to the DestinationQueueInfo property of the original message. The application reading the response message can then look at the response queue information property to determine the origin of the response message.

Equivalent API Property

With API function calls, the equivalent property is PROPID_M_DEST_QUEUE.

Example Code

The following example is included in Using Message Queuing.

For an example of See
Retrieving the destination queue of a message when returning response messages Visual Basic Code Example: Returning Response Messages

Property Value

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

MSMQMessage
MSMQMessage.ResponseQueueInfo
MSMQQueue.Peek
MSMQQueue.PeekCurrent
MSMQQueue.PeekNext
MSMQQueue.Receive
MSMQQueue.ReceiveCurrent
MSMQQueueInfo
PROPID_M_DEST_QUEUE