Share via


PROPID_M_EXTENSION (Windows Embedded CE 6.0)

1/6/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 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, 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 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++;

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

See Also

Reference

MSMQ Properties
MQReceiveMessage
PROPID_M_EXTENSION_LEN
MQMSGPROPS