PROPID_Q_PRIV_LEVEL

Optional. The PROPID_Q_PRIV_LEVEL property specifies the privacy level that is required by the queue. The privacy level determines how the queue handles encrypted messages.

Type Indicator
VT_UI4
PROPVARIANT Field
ulVal
Property Values
This property can be set to one of the following values:
MQ_PRIV_LEVEL_NONE
The queue accepts only non-private (clear) messages.
MQ_PRIV_LEVEL_BODY
The queue accepts only private (encrypted) messages.
MQ_PRIV_LEVEL_OPTIONAL
The default. The queue does not force privacy. It accepts private (encrypted) messages and non-private (clear) messages.

Remarks

The application can set the privacy level of queues and messages. If the privacy level of the message (PROPID_M_PRIV_LEVEL) does not match the privacy level of the queue, the message is rejected by the queue. In addition, if the sending application requested a negative acknowledgment message when it sent the message, MQMSG_CLASS_BAD_ENCRYPTION will be returned to the sending application to indicate the message was rejected.

The privacy level of a message is set by PROPID_M_PRIV_LEVEL. When a message is marked private, its message body is encrypted by MSMQ when the message is sent. For information on security issues, see MSMQ Security Services.

To set the privacy level of a queue, pass PROPID_Q_PRIV_LEVEL to MQCreateQueue when creating the queue.

To change the privacy level of a queue, pass PROPID_Q_PRIV_LEVEL to MQSetQueueProperties. When changing the privacy level of the queue, the new setting only impacts arriving messages; it does not affect messages already in the queue.

To determine the privacy level of a queue, pass PROPID_Q_PRIV_LEVEL to MQGetQueueProperties and examine its returned value.

See Also

MQCreateQueue, MQGetQueueProperties, MQSetQueueProperties, PROPID_M_PRIV_LEVEL


© 1997 by Microsoft Corporation. All rights reserved.