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 MSMQQueueobject represents an open instance of the queue. The MSMQQueueobject provides the methods needed to read the messages in the queue and the properties needed to manage the open queue.

For information on opening the queue, see the MSMQQueueInfo.Openmethod.

Methods

The following table lists the methods of the MSMQQueueobject.

Method Description

MSMQQueue.Close

Closes this instance of the queue.

MSMQQueue.EnableNotification

Starts event notification for asynchronously reading messages in the queue.

MSMQQueue.Peek

Returns the first message in the queue, or waits for a message to arrive if the queue is empty.

MSMQQueue.PeekCurrent

Returns the current message, depending on the position of the cursor.

MSMQQueue.PeekNext

Returns the next message in the queue but does not remove it from the queue.

MSMQQueue.Receive

Retrieves the first message in the queue, removing the message from the queue.

MSMQQueue.ReceiveCurrent

Reads the message at the current cursor location.

MSMQQueue.Reset

Returns the cursor to the start of the queue.

Properties

The following table lists the properties of the MSMQQueueobject.

Property Description

MSMQQueue.Access 

Access: Read only

Data type: Long

Provides the access rights of the open queue.

MSMQQueue.Handle 

Access: Read-only

Data type: Long

Provides the handle of the opened queue.

MSMQQueue.IsOpen 

Access: Read-only

Data type: Short

Provides an indication of whether or not the queue is open.

MSMQQueue.QueueInfo 

Access: Read-only

Data type: MSMQQueueInfo

Provides an MSMQQueueInfoobject that contains the initial settings used to open the queue.

MSMQQueue.ShareMode 

Access: Read-only

Data type: Long

Provides the share mode of the open queue.

Requirements

Header mqoai.h
Library mqoa.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also