The MQSetQueueProperties function sets the properties of a specific queue.
HRESULT APIENTRY MQSetQueueProperties(
LPCWSTR lpwcsFormatName,
MQQUEUEPROPS *pQueueProps
);
On input, the cProp 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 MQQUEUEPROPS, 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 of a public queue, some clients may still see the old settings registered in Active Directory after the properties have been changed. Changes to Active Directory (such as setting properties) are propagated from domain controller to domain controller, which can cause delays in the availability of new information. Consequently, clients using a specific domain controller may still see the old property settings, even though the settings of the properties 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 if there is no connection to Active Directory. This restriction applies to dependent client computers, independent client computers that are working offline, and MSMQ routing servers (FRS), (For information on offline operations, see MSMQ Offline Support.).
Windows NT: Requires version 4.0 SP3 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mq.h.
Import Library: Use mqrt.lib.
Unicode: Defined only as Unicode.
MQGetQueueProperties, MQSetQueueSecurity, PROPID_Q_BASEPRIORITY, PROPID_Q_CREATE_TIME, PROPID_Q_INSTANCE, PROPID_Q_MODIFY_TIME, PROPID_Q_PATHNAME, PROPID_Q_TRANSACTION