Share via


MSMQMessage.Send (Windows CE 5.0)

Send Feedback

This method sends a message to one or more destination queues.

HRESULT.Send( MSMQQueue* DestinationQueue,VARIANT* Transaction)

Parameters

  • DestinationQueue
    Reference to an MSMQDestination or MSMQQueueInfo object.
  • Transaction
    Message to send.

Return Values

The following table describes the common return values.

Value Description
S_OK Success
E_INVALIDARG One or more arguments are invalid
E_NOTIMPL The function contains no implementation
E_OUTOFMEMORY Out of memory

Remarks

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

To get the handle of a queue, use the MSMQQueue.Handle property of the queue.

To save a copy of the message in a computer journal, set MSMQMessage.Journal to MQMSG_JOURNAL.

Messages that do not reach their destination can be sent to a dead-letter queue by setting the message's MSMQMessage.Journal property to MQMSG_DEADLETTER.

When sending messages using Send, you cannot specify the type of message body included in the message. Message Queuing determines the body type and sets the message body type property for you. (The body type property of the message can be accessed only with Message Queuing functions).

Sending Message to Multiple Destinations

To send a message to multiple destinations (introduced in MSMQ 3.0), the DestinationQueue parameter must reference an MSMQDestination object.

Responding to Messages

The sending application can request a response by providing the format name of a response queue when it sends the message. The format name is specified in the MSMQMessage.ResponseQueueInfo property when the message is sent.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Mqoai.h.
Link Library: Mqoa.lib.

See Also

MSMQMessage.Body | MSMQMessage.Journal | MSMQMessage.Label | MSMQMessage | MSMQQueue.Close | MSMQQueue.Handle | MSMQQueue | MSMQQueueInfo.Create | MSMQQueueInfo.Open | MSMQQueueInfo.PathName | MSMQQueueInfo

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.