PROPID_M_SENDERID_LEN

The PROPID_M_SENDERID_LEN property indicates the length of the sender identifier.

Type Indicator
VT_UI4
PROPVARIANT Field
ulVal
Property Values
Length (in bytes) of the sender identifier.

Remarks

The PROPID_M_SENDERID_LEN property is only used by the receiving application when calling MQReceiveMessage. MSMQ attaches this property to the message, along with PROPID_M_SENDERID, when the message is sent.

The receiving application can use PROPID_M_SENDERID_LEN to determine the length of the buffer that is needed for the sender identifier. To do this, peek at the message by calling MQReceiveMessage (specifying PROPID_M_SENDERID_LEN) to find out the length of the sender identifier. Then call MQReceiveMessage again (specifying PROPID_M_SENDERID), setting the caub.cElems field of PROPID_M_SENDERID to the actual length returned by the first call to MQReceiveMessage.

When PROPID_M_SENDERID_LEN is passed to MQReceiveMessage, the corresponding VT field in the aPropVar array can be set to VT_NULL.

See Also

MQReceiveMessage, PROPID_M_SENDERID


© 1997 by Microsoft Corporation. All rights reserved.