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 specifies the length of the information in the PROPID_M_EXTENSIONproperty.

Type Indicator

VT_UI4 (or VT_NULL)

PROPVARIANT Field

ulVal

Property Values

The size (in bytes) of the extension information specified by PROPID_M_EXTENSION.

Remarks

PROPID_M_EXTENSION_LEN is used only by the receiving application. It is used when the receiving application specifies PROPID_M_EXTENSIONin the MQMSGPROPSstructure.

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

When specifying PROPID_M_EXTENSION_LEN, you can set its Type Indicator to VT_NULL. When the Type Indicator is set to VT_NULL, MSMQ sets the VT field to the appropriate type indicator.

When MQReceiveMessagesucceeds, test the returned value of PROPID_M_EXTENSION_LEN to see if extension information exists.

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.

If MQReceiveMessagefails, returning an MQ_ERROR_BUFFER_OVERFLOW error, use the returned value of PROPID_M_EXTENSION_LEN to reallocate the extension information buffer and call MQReceiveMessageagain.

This property is not needed when you use COM components.

Examples

This example shows how PROPID_M_EXTENSION_LEN and PROPID_M_EXTENSION are specified in the MQMSGPROPSstructure.

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