MSMQQueueInfo.Authenticate (Windows Embedded CE 6.0)
1/6/2010
This property specifies whether the queue only accepts authenticated messages.
Syntax
HRESULT get_Authenticate(
long* plAuthenticate
);
HRESULT put_Authenticate(
long lAuthenticate
);
Parameters
plAuthenticate or lAuthenticate
Specifies whether the queue only accepts authenticated messages. The following table shows the possible values.Value Description MQ_AUTHENTICATE_NONE
The default. The queue accepts authenticated and non-authenticated messages.
MQ_AUTHENTICATE
The queue only accepts authenticated messages.
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
This property sets the authentication level of the queue.
When a nonauthenticated message is sent to a queue that only accepts authenticated messages, the message is rejected.
If the sending application has also requested negative acknowledgment messages, a negative acknowledgment message with the message class MQMSG_CLASS_BAD_SIGNATURE is returned to the sending application to indicate the message was rejected.
Setting and Retrieving the Queue Authentication Level
To specify the authentication level when creating the queue, set the MSMQQueueInfo.Authenticate property and call the MSMQQueueInfo.Create method.
To reset the authentication level of an open queue, set MSMQQueueInfo.Authenticate to a new level and call the MSMQQueueInfo.Update method. This method updates the queue information stored by Message Queuing.
For public queues, this information is stored in the directory service.
For private queues, this information is stored on the computer where the messages of the queue are stored.
To retrieve the stored authentication level of a queue, call the MSMQQueueInfo.Refresh method and inspect the MSMQQueueInfo.Authenticate property.
Requesting Message Authentication
The sending application requests authentication by setting the MSMQMessage.AuthLevel message property when the message is sent.
Verifying Message Authentication
To verify that the sending application requested authentication, peek at the MSMQMessage.IsAuthenticated2 property of the message.
Equivalent Function property
When using function calls, the authentication level of the queue can be set and retrieved using the PROPID_Q_AUTHENTICATE property.
Requirements
Header | mqoai.h |
Library | mqoa.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |