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. |
This property specifies the contents of the message.
Syntax
HRESULT get_Body( VARIANT* pvarBody ); HRESULT put_Body( VARIANT varBody ); |
Parameters
- pvarBodyor varBody
-
Any intrinsic Variant, including string, date, currency, number, or an array of bytes, or any persistent COM object that supports IDispatchand IPersist( IPersistStreamor IPersistStorage).
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.Bodyproperty.
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_BODYproperty.
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 |