次の方法で共有


Sending Response Messages (COM) (Windows CE 5.0)

Send Feedback

The receiving application can return response messages to the response queue provided by the sending application.

When the receiving application reads the message and sees that a response is requested (MSMQMessage.ResponseQueueInfo is not NULL), it should then return a response message to the queue specified by MSMQMessage.ResponseQueueInfo.

Note   Each Message Queuing message can have no more than 4 MB of data.

To request a response

  1. Determine what type of response message is needed.

    Response messages are application-defined, consequently both the sending and receiving applications must be able to understand the message.

  2. Specify the MSMQQueueInfo object of the destination queue that contains the messages sent by the sending application.

  3. Call MSMQQueueInfo.Open to open the destination queue with receive access.

  4. Verify that a response message was requested.

    This example inspects the MSMQMessage.ResponseQueueInfo property of the message and then uses MSMQMessage. ResponseQueueInfo to open the response queue if a response is requested.

  5. Create the response message as needed.

  6. Call MSMQMessage.Send to send the response message to the response 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.