Share via


PROPID_M_COMPOUND_MESSAGE_SIZE

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

(Introduced in MSMQ 3.0.) The PROPID_M_COMPOUND_MESSAGE_SIZE property provides the size of an entire SRMP message, including both the SOAP envelope and the SOAP attachments associated with it.

Property ID

PROPID_M_COMPOUND_MESSAGE_SIZE

Type Indicator

VT_UI4

MQPROPVARIANT Field

ulVal

Property Value

The size (in bytes) of the entire SRMP message, including both the SOAP envelope and the SOAP attachments, provided by PROPID_M_COMPOUND_MESSAGE.

Remarks

The PROPID_M_COMPOUND_MESSAGE_SIZE property is a read-only property that is only used when retrieving SRMP messages.

To retrieve the entire contents of an SRMP message, including both the SOAP envelope and the SOAP attachments associated with it, see PROPID_M_COMPOUND_MESSAGE.

If the function call to retrieve the entire contents of an SRMP message fails, returning an MQ_ERROR_BUFFER_OVERFLOW error, use the returned value of PROPID_M_COMPOUND_MESSAGE_SIZE to reallocate the message body buffer and call the applicable function again.

When retrieving PROPID_M_COMPOUND_MESSAGE_SIZE, you can set its type indicator to VT_UI4 or VT_NULL. If you set the type indicator to VT_NULL, Message Queuing automatically changes the type indicator to VT_UI4 during the function call.

Equivalent COM Property

There is no COM equivalent for this property.

Example Code

The following code fragment shows how PROPID_M_COMPOUND_MESSAGE_SIZE is specified in arrays that can be used to initialize an MQMSGPROPS structure when retrieving an SRMP message.

aMsgPropID[i] = PROPID_M_COMPOUND_MESSAGE_SIZE;  
aMsgPropVar[i].vt = VT_NULL;  
i++;  
  
ULONG ulMsgBufferSize = 4096;  
UCHAR * pucMsgBuffer = NULL;  
pucMsgBuffer = (UCHAR *)malloc(ulMsgBufferSize);  
if (pucMsgBuffer == NULL)  
{  
  return MQ_ERROR_INSUFFICIENT_RESOURCES;  
}  
memset(pucMsgBuffer, 0, ulMsgBufferSize);  
aMsgPropID[i] = PROPID_M_COMPOUND_MESSAGE;  
aMsgPropVar[i].vt = VT_VECTOR | VT_UI1;  
aMsgPropVar[i].caub.pElems = (UCHAR*)pucMsgBuffer;  
aMsgPropVar[i].caub.cElems = ulMsgBufferSize;  
i++;  

See Also

Message Properties
MQMSGPROPS
PROPID_M_COMPOUND_MESSAGE
PROPID_M_SOAP_ENVELOPE