Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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.
Syntax
HRESULT get_SenderId( VARIANT* pvarSenderId ); |
Parameters
- pvarSenderId
-
An array of bytes generated by MSMQ.
Return Value
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
SenderIdis 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.SenderIdTypeto 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 SenderIdto retrieve information about who sent the message. However, the information in SenderIdis only trustworthy if the message was authenticated.
Requirements
Header | mqoai.h |
Library | mqoa.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |