MSMQMessage.SenderId (Windows CE 5.0)
This property is an array of bytes that represents the identifier of the sending user. Typically, Message Queuing sets this property when the message is sent.
HRESULT get_SenderId( VARIANT* pvarSenderId);
Parameters
- pvarSenderId
An array of bytes generated by MSMQ.
Return Values
The following table describes common return values.
Value | Description |
---|---|
S_OK | Success |
E_INVALIDARG | One or more arguments are invalid |
E_NOTIMPL | The function contains no implementation |
E_OUTOFMEMORY | Out of memory |
Remarks
SenderId is set by MSMQ, and is used primarily by the receiving queue manager when authenticating a message. The receiving queue manager uses the sender identifier in this property to verify who sent the message and to verify that the sender has access rights to a queue.
By default, Message Queuing sets this property when a message is sent. However, Message Queuing will not attach the sender identifier to the message if the sending application has set MSMQMessage.SenderIdType to MQMSG_SENDERID_TYPE_NONE, indicating that the sending application does not want Message Queuing to validate who sent the message.
The receiving application can use SenderId to retrieve information about who sent the message. However, the information in SenderId is only trustworthy if the message was authenticated.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Mqoai.h.
Link Library: Mqoa.lib.
See Also
MSMQMessage | MSMQMessage.SenderIdType
Send Feedback on this topic to the authors