The PROPID_M_SENDERID_LEN property indicates the length of the sender identifier.
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.
MQReceiveMessage, PROPID_M_SENDERID