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 ...
Get Windows® CE 3.0 Application Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.