MSMQQueueInfo.Update

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The Update method of the MSMQQueueInfo object updates the directory service (local and remote public queues) or the local computer (local private queues) with the current property values of the MSMQQueueInfo object.

Sub Update
()  

Parts

This method has no parameters.

Return Values

This method has no return values.

Error Codes

For information on return codes, see Message Queuing Error and Information Codes.

Remarks

The Update method can update the property values of existing public and local private queues. It cannot be called on an MSMQQueueInfo object before the queue is created or after the queue is deleted. (Message Queuing updates queue property values only when a queue is created, when a queue is opened, and whenever Update is explicitly called.)

When Update is called, the local queue property values of the MSMQQueueInfo object are stored in one of two places. For public queues, these property values are stored in the directory service. For local private queues, these property values are stored on the local computer. The Update method cannot be called to change the property values of a remote private queue.

The Update method cannot update the values stored by Message Queuing for the following queue properties:

This property is set only when the queue is created. Resetting the PathName property of an MSMQQueueInfo object causes the object to reference the queue specified by the new path name.

When setting the properties of a public queue, some clients may still see the old settings registered in the directory service after the properties are changed. Changes to the directory service (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 Update. Propagation delays, including communication network delays such as down links, are controlled by the MSMQ administrator.

Equivalent Function

To set the properties of a queue using function calls, see the MQSetQueueProperties function.

Example Code

The following example is included in Using Message Queuing.

For an example of See
Setting the properties of an existing queue Changing Queue Behavior Examples

Requirements

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQQueueInfo