Reading Messages from a Dead-Letter Queue (COM) (Windows CE 5.0)

Send Feedback

To read non-transactional messages from a dead-letter queue you must first obtain the machine identifier (GUID) of the computer associated with the DEADLETTER.

The machine identifier is combined with the "Machine" and "DEADLETTER" keywords to create the format name of the queue. Here is the syntax of format name for the dead-letter queue.

Machine=MachineGUID;DEADLETTER 

To retrieve a message from a dead-letter queue

  1. Declare the variables needed to retrieve the message.
  2. Call MSMQApplication.MachineIdOfMachineName to obtain the machine identifier.
  3. Construct the format name of the dead-letter queue.
  4. Declare the variables needed to retrieve the message.
  5. Call MSMQQueueInfo.Open to open the queue with receive access.
  6. Call MSMQQueue.Receive to retrieve the first message in the queue.
  7. Call MSMQQueue.Close to close the dead-letter queue.

See Also

MSMQ Application Development | MSMQ COM Support | Using the COM Components | MSMQ Security

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.