PROPID_M_DEST_QUEUE (Windows CE 5.0)

Send Feedback

This property identifies the original destination queue of a message.

  • Type Indicator
    VT_LPWSTR
  • PROPVARIANT Field
    pwszVal
  • Property Values
    Format name of the destination queue.

Remarks

PROPID_M_DEST_QUEUE is only used by the receiving application. MSMQ attaches this property to the message according to the destination queue specified in the call to MQSendMessage.

PROPID_M_DEST_QUEUE is typically used to determine the destination queue of a message that is in a journal or dead-letter queue; however, it can also be used when sending response message back to a response queue.

To retrieve the destination queue of a message, specify PROPID_M_DEST_QUEUE and PROPID_M_DEST_QUEUE_LEN in the MQMSGPROPS structure. Then call MQReceiveMessage and examine the returned values.

If MQReceiveMessage fails, returning an MQ_ERROR_BUFFER_OVERFLOW error, use the returned value of PROPID_M_DEST_QUEUE_LEN to reallocate the format name buffer and then call MQReceiveMessage again.

Examples

This example shows how PROPID_M_DEST_QUEUE is specified in the MQMSGPROPS structure for retrieving the destination queue format name.

DWORD dwDestFormatNameBufferLength = MQ_MAX_Q_NAME_LEN;
WCHAR wszDestFormatNameBuffer[MQ_MAX_Q_NAME_LEN];
aMsgPropId[i] = PROPID_M_DEST_QUEUE;        // Property ID
aMsgPropVar[i].vt = VT_LPWSTR;              // Type indicator
aMsgPropVar[i].pwszVal = wszDestFormatNameBuffer;
i++;

aMsgPropId[i] = PROPID_M_DEST_QUEUE_LEN;    // Property ID
aMsgPropVar[i].vt = VT_UI4;                 // Type indicator
aMsgPropVar[i].ulVal = dwDestFormatNameBufferLength;
i++;

Requirements

OS Versions: Windows CE 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack.
Header: Mq.h.

See Also

MQReceiveMessage | MQSendMessage | PROPID_M_DEST_QUEUE_LEN | MQMSGPROPS

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.