PROPID_Q_AUTHENTICATE (Compact 2013)

3/26/2014

Optional. This property specifies whether the queue accepts only authenticated messages.

  • Type Indicator
    VT_UI1
  • PROPVARIANT Field
    bVal
  • Property Values
    This property can be set only to the following value.

    Value

    Description

    MQ_AUTHENTICATE_NONE

    The default. The queue accepts authenticated and nonauthenticated messages.

Remarks

The implementation of MSMQ does not support authentication.

To set the initial authentication level of a new queue, specify PROPID_Q_AUTHENTICATE in the MQQUEUEPROPS structure and call MQCreateQueue.

To set the authentication level of an existing queue, specify PROPID_Q_AUTHENTICATE in the MQQUEUEPROPS structure and call MQSetQueueProperties.

When changing the authentication level of the queue, the new setting impacts only arriving messages; it does not affect messages already in the queue.

To retrieve the authentication level of an existing queue, specify PROPID_Q_AUTHENTICATE in the MQQUEUEPROPS structure; then call MQGetQueueProperties and examine its returned value.

Examples

The following examples show how PROPID_Q_AUTHENTICATE is specified in the MQQUEUEPROPS structure for setting and retrieving the authentication level of a queue.

To set the authentication level

aPropID[i] = PROPID_Q_AUTHENTICATE;   // Property identifier
aVariant[i].vt = VT_UI1;              // Type indicator
aVariant[i].bVal = MQ_NONE_AUTHENTICATE;   // Authentication level of queue
i++;

To retrieve the authentication level

aPropID[i] = PROPID_Q_AUTHENTICATE;   // Property identifier
aVariant[i].vt = VT_UI1;              // Type indicator
i++;

Note

OS versions prior to 2.12 require the MSMQ add-on pack.

Requirements

Header

mq.h

See Also

Reference

MSMQ Properties
MQCreateQueue
MQGetQueueProperties
MQSetQueueProperties
MQQUEUEPROPS