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.
A version of this page is also available for
4/8/2010

This property specifies whether the queue only accepts authenticated messages.

Syntax

HRESULT get_Authenticate( 
  long* 
plAuthenticate 
);
HRESULT put_Authenticate( 
  long 
lAuthenticate
);

Parameters

plAuthenticateor 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.Authenticateproperty and call the MSMQQueueInfo.Createmethod.

To reset the authentication level of an open queue, set MSMQQueueInfo.Authenticateto a new level and call the MSMQQueueInfo.Updatemethod. 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.Refreshmethod and inspect the MSMQQueueInfo.Authenticateproperty.

Requesting Message Authentication

The sending application requests authentication by setting the MSMQMessage.AuthLevelmessage property when the message is sent.

Verifying Message Authentication

To verify that the sending application requested authentication, peek at the MSMQMessage.IsAuthenticated2property 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
Windows Mobile Windows Mobile Version 5.0 and later