Dequeue Method  
 

Remove the next item from the server FIFO queue.

This method has been deprecated and may not be included in future versions of the control.

Syntax

object.Dequeue( ItemData, [Remove] )

Parameters

ItemData
A Variant data type that is passed by reference to the method. When the method returns, it will contain the data for the next item in the queue.
Remove
An optional boolean parameter that specifies if the item is removed from the queue.

Return Value

If the method is successful, it will return a value of True. If there are no items remaining in the queue or the method fails to retrieve the next item, it will return a value of False.

Remarks

The Dequeue method retrieves the next item from the server FIFO (first in, first out) queue.

If the optional Remove parameter is True, the item is removed from the queue and the memory that was allocated for it is released. If the parameter is false, then a copy of the item data is returned, but it is not removed from the queue. This allows an application to peek at the next item in the queue without removing it. The server queue methods are thread-safe and each update to the queue is an atomic operation. This enables an application to easily exchange information with other client sessions, or even other servers.

To obtain the number of items in the server queue, use the QueueCount property. To remove all items from the queue, use the ClearQueue method.

Note that queued items are only available while the server is active. Once the server has been stopped, any queued items are automatically removed and the memory allocated for the queue is released.

See Also