Share via


MSMQMessage.SenderIdType (Windows Embedded CE 6.0)

1/6/2010

This property specifies the type of sender identifier found by MSMQ. Currently, the only type of sender identifier available to Message Queuing is a security identifier (SID).

Syntax

HRESULT get_SenderIdType( 
  long* plSenderIdType 
);
HRESULT put_SenderIdType( 
  long lSenderIdType
);

Parameters

  • plSenderIdType or lSenderIdType
    Type of sender identifier found by MSMQ. The following table shows the possible values.

    Value Description

    MQMSG_SENDERID_TYPE_NONE

    MSMQMessage.SenderId is not attached to the message.

    MQMSG_SENDERID_TYPE_SID

    The default. The SenderId property contains a SID for the user sending the message.

Return Value

The following table describes the 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

If the sending application does not want Message Queuing to authenticate who sent the message, it can specify MQMSG_SENDERID_TYPE_NONE when sending a message. This tells Message Queuing not to attach the SID to MSMQMessage.SenderId.

If the sender identifier is not sent with the message, the access rights of the queue must be set to accept messages from everyone.

The receiving application can use SenderIdType to determine what type of sender identifier was attached to the message.

A SID of a local user (a user not logged in to a Microsoft® Windows® 2000 domain) is only valid locally. Even if a local user specifies a SID, it is not sent with the message.

Requirements

Header mqoai.h
Library mqoa.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

MSMQMessage
MSMQMessage.SenderId