Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This object provides access to the properties needed to define a message, plus the methods needed to send the message to its destination queue.

The body of a message can consist of the following:

Methods

The following table lists the methods of the MSMQMessageobject.

Method Description

MSMQMessage.Send

Sends the message to the specified queue.

Properties

The following table lists the properties of the MSMQMessageobject.

Property Description

MSMQMessage.Ack

Access: Read/write

Data type: Long

Specifies the type of acknowledgment messages that Message Queuing returns to the administration queue.

MSMQMessage.AdminQueueInfo

Access: Read/write

Data type: MSMQQueueInfo

Specifies the queue used for acknowledgment messages.

MSMQMessage.AppSpecific

Access: Read/write

Data type: Long

Specifies application-generated information for filtering messages.

MSMQMessage.ArrivedTime

Access: Read-only

Data type: Date Variant

Provides the time when the message arrived at the queue.

MSMQMessage.AuthLevel

Access: Read/write

Data type: Long

Specifies whether the message should be authenticated when received by the queue.

MSMQMessage.Body

Access: Read/write

Data type: Variant

Specifies the body of the message.

MSMQMessage.BodyLength

Access: Read-only

Data type: Long

Provides the size of the message body.

MSMQMessage.Class

Access: Read-only

Data type: Long

(Superseded by MsgClass.) Provides the type of message.

MSMQMessage.CorrelationId

Access: Read/write

Data type: Variant (array of bytes)

Specifies the correlation identifier of the message.

MSMQMessage.Delivery

Access: Read/write

Data type: Long

Specifies how the message is delivered (optimize throughput or recoverability).

MSMQMessage.DestinationQueueInfo

Access: Read-only

Data type: MSMQQueueInfo

Provides the queue where the message resides (the queue the message is sent to).

MSMQMessage.EncryptAlgorithm

Access: Read/write

Data type: Long

Specifies the algorithm used to encrypt the message body.

MSMQMessage.Extension

Access: Read/write

Data type: Variant (array of bytes)

(Introduced in MSMQ 2.0.) Specifies additional application-defined information.

MSMQMessage.HashAlgorithm

Access: Read/write

Data type: Long

Specifies the hash algorithm used when authenticating messages.

MSMQMessage.Id

Access: Read-only

Data type: Variant (array of bytes)

Provides the MSMQ-generated identifier for the message.

MSMQMessage.IsAuthenticated

Access: Read-only

Data type: Short

Indicates whether the message was authenticated by MSMQ.

MSMQMessage.Journal

Access: Read/write

Data type: Long

Specifies whether a copy of the message is stored in the computer journal.

MSMQMessage.Label

Access: Read/write

Data type: String

Specifies an application-defined label for the message.

MSMQMessage.MaxTimeToReachQueue

Access: Read/write

Data type: Long

Specifies how long the message has to reach the queue.

MSMQMessage.MaxTimeToReceive

Access: Read/write

Data type: Long

Specifies how long the receiving application has to remove the message from the queue.

MSMQMessage.Priority

Access: Read/write

Data type: Long

Specifies the priority of the message (where it is placed in the queue).

MSMQMessage.PrivLevel

Access: Read/write

Data type: Long

Specifies whether the message is private (encrypted).

MSMQMessage.ResponseQueueInfo

Access: Read/write

Data type: MSMQQueueInfo

Specifies the queue for sending responses to the message.

MSMQMessage.SenderCertificate

Access: Read/write

Data type: Variant (array of bytes)

Specifies the sender certificate.

MSMQMessage.SenderId

Access: Read/write

Data type: Variant (array of bytes)

Identifies the user who sent the message.

MSMQMessage.SenderIdType

Access: Read/write

Data type: Long

Specifies the type of sender identifier found in SenderId.

MSMQMessage.SentTime

Access: Read-only

Data type: Date Variant

Provides the date and time that the message was sent.

MSMQMessage.SourceMachineGuid

Access: Read-only

Data type: String (GUID format)

Provides the identifier of the computer where the message originated.

MSMQMessage.Trace

Access: Read/write

Data type: Long

Specifies whether the route of the message is traced.

Requirements

Header mqoai.h
Library mqoa.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later