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

The privacy level of a queue ( MSMQQueueInfo.PrivLevel) specifies whether the queue accepts private (encrypted) messages, non-private messages, or both.

By default a queue accepts both private and non-private messages.

Note:
If your application does not have MQSEC_GET_QUEUE_PROPERTIES access rights for the queue, an MQ_ERROR_ACCESS_DENIED error is returned to MSMQQueueInfo.Refresh.
To retrieve MSMQQueueInfo.PrivLevel
  1. Declare the MSMQQueueInfovariable for the queue.

  2. Obtain an MSMQQueueInfoobject.

  3. (Optional) Call MSMQQueueInfo.Refreshif other applications may have changed the privacy level of the queue.

  4. Use MSMQQueueInfo.PrivLevelas needed.

See Also