PROPID_M_EXTENSION
This property provides a place to put additional application-defined information that is associated with the message.
- Type Indicator
VT_UI1 | VT_VECTOR - PROPVARIANT Field
caub - Property Values
Array of bytes
Remarks
The PROPID_M_EXTENSION property is typically used by applications that need to specify or read non-MSMQ message properties when working with foreign queues. It is the responsibility of the application to understand the content of this property.
To send extension information, specify PROPID_M_EXTENSION in the MQMSGPROPS structure and call MQSendMessage.
To retrieve extension information, specify PROPID_M_EXTENSION and PROPID_M_EXTENSION_LEN in the MQMSGPROPS structure. Then call MQReceiveMessage and examine the returned values.
Before using the returned value of PROPID_M_EXTENSION, always inspect the returned value of PROPID_M_EXTENSION_LEN to see if any extension information was sent. A returned value of 0 indicates that no information was sent by the sending application. A nonzero returned value indicates the extension information was returned by PROPID_M_EXTENSION.
This property is not available when you are using COM components.
Examples
The following examples show how PROPID_M_EXTENSION is specified in the MQMSGPROPS structure for sending and retrieving extension information.
To send extension information
aMsgPropId[i] = PROPID_M_EXTENSION; // Property ID
aMsgPropVar[i].vt = VT_UI1 | VT_VECTOR; // Type indicator
aMsgPropVar[i].caub.pElems = ExtensionInformation;
aMsgPropVar[i].caub.cElems = sizeof(ExtensionInformation);
i++;
To retrieve extension information
aMsgPropId[i] = PROPID_M_EXTENSION_LEN; // Property ID
aMsgPropVar[i].vt = VT_UI4; // Type indicator
i++;
aMsgPropId[i] = PROPID_M_EXTENSION; // Property ID
aMsgPropVar[i].vt = VT_UI1 | VT_VECTOR; // Type indicator
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, PROPID_M_EXTENSION_LEN, MQMSGPROPS
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.