PROPID_M_BODY_TYPE

This property indicates the type of body the message contains.

  • Type Indicator
    VT_UI4 (or VT_NULL)
  • PROPVARIANT Field
    ulVal
  • Property Values
    Type of message body. The default is 0.

Remarks

It is recommended that the sending application set PROPID_M_BODY_TYPE whenever sending messages. If PROPID_M_BODY_TYPE is not set, the application reading the message should assume the message is an array of bytes. The MSMQ COM implementation does this automatically.

To set the body type, specify PROPID_M_BODY_TYPE and PROPID_M_BODY in the MQMSGPROPS structure and call MQSendMessage.

To retrieve the body type, specify PROPID_M_BODY_TYPE in the MQMSGPROPS structure. Then call MQReceiveMessage and examine the returned value. When specifying PROPID_M_BODY_TYPE, 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.

The body of a message can consist of any type of information. It is the responsibility of the sending and receiving application to understand the type of information that is in the message. For example, the sending application could send a binary file with any internal structure, and it would be the responsibility of the receiving application to know how to decipher what was sent.

The MSMQ COM implementation supports the following specific types: VT_I2. VT_UI2, VT_I4, VT_UI4, VT_R4, VT_R8, VT_CY, VT_DATE, VT_BOOL, VT_I1, VT_UI1, VT_BSTR, VT_ARRAY, VT_STREAMED_OBJECT, and VT_STORED_OBJECT, where the last two indicate serialized objects that support IPersistStream and lPersistStorage. There are many persistent objects, such as all Microsoft Office documents, that can be sent as MSMQ messages.

This property is not available when you are using COM components.

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, MQSendMessage, lPersistStorage, PROPID_M_BODY, MQMSGPROPS

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.