PROPID_M_DEST_QUEUE
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. It 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.
Example
This example shows how PROPID_M_DEST_QUEUE is specified in the MQMSGPROPS structure for retrieving the destination queue format name.
DWORD dwDestFormatNameBufferLength = 256;
WCHAR szDestFormatNameBuffer[256];
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
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack. | Mq.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
MQReceiveMessage, MQSendMessage, PROPID_M_DEST_QUEUE_LEN, MQMSGPROPS
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.