Share via


MSMQMessage.Body

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This property specifies the contents of the message.

Syntax

HRESULT get_Body( 
  VARIANT* pvarBody 
);
HRESULT put_Body( 
  VARIANT varBody 
);

Parameters

Return Value

The following table describes the common return values.

Value Description

S_OK

Success

E_INVALIDARG

One or more arguments are invalid

E_NOTIMPL

The function contains no implementation

E_OUTOFMEMORY

Out of memory

Remarks

Each Message Queuing message can have no more than 4 MB of data.

When sending messages using COM components, the sending application does not indicate the type of information (string, array of bytes, numeric types, currency, date, or COM object) that is stored in the message body. Message Queuing determines the body type from the true type of the Variant assigned to the MSMQMessage.Body property.

When peeking at or retrieving messages, the receiving application should determine what type of information is in the message body before processing the message body.

Message Queuing COM components ignore characters that follow the first null character in a string, including in the body of a message, without returning an error.

Equivalent Function property

When using functions, the body of the message can be set and retrieved using the PROPID_M_BODY property.

Requirements

Header mqoai.h
Library mqoa.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

MSMQMessage
PROPID_M_BODY