MSMQMessage.BodyLength (Windows CE 5.0)
This read-only property provides the length of the message body in bytes.
HRESULT get_BodyLenth( long* pcbBody);
Parameters
- pcbBody
Length, in bytes, of the message.
Return Values
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.
MSMQMessage.BodyLength can be used by sending or receiving applications.
- Sending applications can use MSMQMessage.BodyLength to find the size of the message body as soon as MSMQMessage.Body is set, including before and after the message is sent.
- Receiving applications can use BodyLength to find the size of a message before or after retrieving the message body.
Equivalent Function property
When using functions, the size of body of the message can be retrieved using the PROPID_M_BODY_SIZE property.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Mqoai.h.
Link Library: Mqoa.lib.
See Also
MSMQMessage | MSMQMessage.Body | PROPID_M_BODY_SIZE
Send Feedback on this topic to the authors