Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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.

The application is responsible to understand the content of this property.

To send extension information, specify PROPID_M_EXTENSION in the MQMSGPROPSstructure and call MQSendMessage.

To retrieve extension information, specify PROPID_M_EXTENSIONand PROPID_M_EXTENSION_LENin the MQMSGPROPSstructure. Then call MQReceiveMessageand examine the returned values.

Before using the returned value of PROPID_M_EXTENSION, inspect the returned value of PROPID_M_EXTENSION_LENto see if 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 use COM components.

Examples

The following examples show how PROPID_M_EXTENSION is specified in the MQMSGPROPSstructure for sending and retrieving extension information.

To send extension information

Copy Code
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

Copy Code
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++;
Note:
OS versions prior to 2.12 require the MSMQ add-on pack.

Requirements

Header mq.h
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also