Opening a Queue (COM) (Windows CE 5.0)
To open a queue, the application must specify the access mode and share mode of the queue when it calls MSMQQueueInfo.Open.
The Open method returns an MSMQQueue object that can be used for the following:
Sending messages to the queue (MSMQMessage.Send).
Reading messages in the queue (MSMQQueue.Peek, MSMQQueue.PeekNext, MSMQQueue.Receive).
Enabling notification for reading messages asynchronously (MSMQQueue.EnableNotification).
Closing the queue (MSMQQueue.Close).
**Note **The MSMQQueue object exposes a queue handle that can be used to call Message Queuing functions directly.
When a queue is opened, its properties are based on the properties of the MSMQQueueInfo object when the queue was opened. Later, while the queue is opened, the application can see the properties of the queue by calling the MSMQQueue object's QueueInfo property.
The following examples show several ways to open queues.
For examples on | See |
---|---|
Opening a queue to send messages | Opening a Queue to Send Messages (COM) |
Opening a queue to peek at or retrieve messages | Opening a Queue to Read Messages (COM) |
See Also
MSMQ Application Development | MSMQ COM Support | Using the COM Components | MSMQ Security
Send Feedback on this topic to the authors