PROPID_M_SENDERID

The PROPID_M_SENDERID property identifies who sent the message.

Type Indicator
VT_VECTOR | VT_UI1
PROPVARIANT Field
caub
Property Values
An array of bytes generated by MSMQ.

Remarks

The PROPID_M_SENDERID property is primarily used by MSMQ security to authenticate messages when they are retrieved from the queue. For information on authenticating messages, see Authenticating Messages Using API Functions.

The PROPID_M_SENDERID property is also used internally to verify that the sender has access rights to the queue. Verification is done by the receiving Queue Manager when it receives the message.

When a message is sent (and PROPID_M_SENDERID_TYPE is not set to MQMSG_SENDERID_TYPE_NONE), MSMQ attaches PROPID_M_SENDERID to the message.

Receiving applications can pass PROPID_M_SENDERID to MQReceiveMessage to verify who sent a message. To find out the length of the buffer needed for the sender identifier, 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.

See Also

MQReceiveMessage, PROPID_M_SENDERID_LEN, PROPID_M_SENDERID_TYPE


© 1997 by Microsoft Corporation. All rights reserved.