O'Reilly logo

Windows® CE 3.0 Application Programming by Marshall Brain, Nick Grattan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading Messages from a Queue

Messages can be read from a queue on the same Windows CE device or on another computer. You need to have a valid network connection to the other computer to read from a remote queue. To read one or more messages from a queue, you must do the following:

  • Open the queue using MQOpenQueue
  • Initialize a MQMSGPROPS structure in which the message will be received
  • Call MQReceiveMessage (Table 15.3) to read a message, if one is present
  • Close the queue when finished reading messages by calling MQCloseQueue

The minimum properties needed to pass to MQReceiveMessage are the following:

  • PROPID_M_BODY_SIZE— Property receives the number of bytes in the message body

  • PROPID_M_BODY— Property receives the message body data

The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required