Delen via


Reading Messages

 

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.

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.

More Information

For information on See
Synchronous operations Synchronous Reading
Asynchronous operations Asynchronous Reading
Removing a message when it is read Retrieving Messages
Leaving a message when it is read Peeking at Messages
Saving copies of messages removed from a queue Target Journaling
Reading messages from queues hosted on remote computers Reading Messages from Remote Queues
For an example of See
Reading the first message in the queue synchronously C/C++ Code Example: Reading Messages Synchronously

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

 Visual Basic Code Example: Reading Messages Synchronously
Reading messages asynchronously C/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