Reading Messages

 

Updated: July 19, 2016

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 receiving application can read the messages in a queue either synchronously or asynchronously. Messages can be removed from the queue when they are read, or they can be left in the queue. Additionally, a receiving application can read all its messages from within a transaction.

System_CAPS_ICON_note.jpg Note

Messages cannot be read from a queue on a computer that does not have a direct connection. Opening a queue with receive or peek access requires a direct connection to the computer where the queue is resides.

For information onSee
Synchronous operationsSynchronous Reading
Asynchronous operationsAsynchronous Reading
Removing a message when it is readRetrieving Messages
Leaving a message when it is readPeeking at Messages
Saving copies of messages removed from a queueTarget Journaling
Reading messages from queues hosted on remote computersReading Messages from Remote Queues
For an example ofSee
Reading the first message in the queue synchronouslyC/C++ Code Example: Reading Messages Synchronously

 C/C++ COM Code Example: Reading Messages Synchronously

 Visual Basic Code Example: Reading Messages Synchronously
Reading messages asynchronouslyC/C++ Code Example: Reading Messages Asynchronously Using a Callback Function

 C/C++ Code Example: Reading Messages Asynchronously Using Completion Ports

 C/C++ COM Code Example: Reading Messages Asynchronously

 Visual Basic Code Example: Reading Messages Asynchronously

Community Additions

ADD
Show: