Creating .NET Compact Framework applications that use Message Queuing (also known as MSMQ) is similar to the process that is used in the .NET Framework. However, Windows CE does not support all the features described in MSMQ in the .NET Compact Framework.
The following code examples show how to create a message queue, send a message to the queue, and receive a message from the queue, all on the same device. No network connectivity is required. A simple class, Order, is used to create objects for Message Queuing.
These examples assume that Message Queuing has been installed on the device. For more information about obtaining the Message Queuing component, see MSMQ in the .NET Compact Framework.
To define the Order class
To create the message queue
To send a message to the queue
To receive the message from the queue
To test message queuing
Add a button to the form, labeled Send, that calls the CreateQueue and SendMessageToQueue methods.
Add a button to the form, labeled Receive, that calls the ReceiveMessageFromQueue method.
This example requires references to the following namespaces:
Tasks
Concepts