次の方法で共有


MSMQMessage.Body (Compact 2013)

3/26/2014

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

See Also

Reference

MSMQMessage
PROPID_M_BODY