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 used only 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 needed for the sender identifier. To determine this length, 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.

QuickInfo

  Windows NT: Requires version 4.0 SP3 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in mq.h.
  Import Library: Use mqrt.lib.
  Unicode: Defined only as Unicode.

See Also

MQReceiveMessage, PROPID_M_SENDERID