Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This property specifies the length of the information in the PROPID_M_EXTENSION property.
- 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_EXTENSION in the MQMSGPROPS structure.
To retrieve extension information, set PROPID_M_EXTENSION and PROPID_M_EXTENSION_LEN in the MQMSGPROPS structure. Then call MQReceiveMessage and 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 MQReceiveMessage succeeds, 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 MQReceiveMessage fails, returning an MQ_ERROR_BUFFER_OVERFLOW error, use the returned value of PROPID_M_EXTENSION_LEN to reallocate the extension information buffer and call MQReceiveMessage again.
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 MQMSGPROPS structure.
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
OS Versions: Windows CE 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack.
Header: Mq.h.
See Also
MQReceiveMessage | PROPID_M_EXTENSION | MQMSGPROPS
Send Feedback on this topic to the authors