Sending a File as a Message (COM) (Windows CE 5.0)
Files can be sent as messages by converting the file to an array of bytes, then sending the byte-array as the body of the message.
Note Each Message Queuing message can have no more than 4 MB of data.
To send a file as a message
- Declare an MSMQQueueInfo, MSMQQueue, and MSMQMessage objects, plus a byte array for the file.
- Call MSMQQueueInfo.Open to open the destination queue with send access.
- Put the file in the body of the message.
- Optional. Set additional message properties.
- Call MSMQMessage.Send to send the message to the destination queue.
- Call MSMQQueue.Close to close the queue.
See Also
MSMQ Application Development | MSMQ COM Support | Using the COM Components | MSMQ Security
Send Feedback on this topic to the authors