Reading Messages Using a Cursor (COM) (Windows Embedded CE 6.0)
1/6/2010
When reading messages using a cursor, the receiving application can navigate to any number of messages in the queue.
The following example navigates through the queue, displaying the label of each message it finds.
Note
Cursors can be used when reading messages synchronously or asynchronously.
To read messages using a cursor
Declare the objects needed to read the messages.
Obtain a QueueInfo object.
Open the queue with receive or peek access.
Call MSMQQueue.PeekCurrent to point the cursor to the first message in the queue.
Using a loop structure, call MSMQQueue.PeekNext to move the cursor and read all the messages in the queue.
Call MSMQQueue.Close to close the queue.
See Also
Concepts
Reading Messages in a Queue (COM)
MSMQ COM Support
Using the COM Components
MSMQ Security