The MQSetQueueProperties function sets the properties of a specific queue.
HRESULT APIENTRY MQSetQueueProperties( LPCWSTR lpwcsFormatName, MQQUEUEPROPS *pQueueProps );
On input, the cProps member of MQQUEUEPROPS specifies the number of properties to be set, the aPropID array specifies their property identifiers, and the aPropVar array indicates the new values of the specified properties.
On output, the optional aStatus array, if it was included in MQQUEUPROPS, indicates the status of the properties.
To change access rights, call MQSetQueueSecurity.
If the format name of the queue is unknown, see Format Name to find ways to obtain a new format name.
The following queue properties cannot be set by MQSetQueueProperties.
Property Name | Reason |
PROPID_Q_BASEPRIORITY | For public queues only. Cannot be set for private queues. |
PROPID_Q_CREATE_TIME | Set by MSMQ. |
PROPID_Q_INSTANCE | Set by MSMQ. |
PROPID_Q_MODIFY_TIME | Set by MSMQ. |
PROPID_Q_PATHNAME | Can only be set when the queue is created. |
PROPID_Q_TRANSACTION | Can only be set when the queue is created. |
For a list of the queue properties you can set, see Setting a Queue's Properties Using API Functions.
When setting the properties for public queues, some clients may see the old settings registered in MQIS. Changes to MQIS (such as setting queue properties) are propagated from site to site, which can cause delays in availability of the most current information. Consequently, clients in some sites may still see old settings, even though they were changed by MQSetQueueProperties. Propagation delays, including communication network delays such as down links, are controlled by the MSMQ Administrator.
A public queue's properties cannot be set by an independent client computer running offline. For information on offline operations, see MSMQ Offline Support.
MQGetQueueProperties, MQSetQueueSecurity, PROPID_Q_BASEPRIORITY, PROPID_Q_CREATE_TIME, PROPID_Q_INSTANCE, PROPID_Q_MODIFY_TIME, PROPID_Q_PATHNAME, PROPID_Q_TRANSACTION