MSMQMessage

 

Updated: July 19, 2016

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The MSMQMessage object provides access to the properties that define a message and the methods used to send the message to its destination queue.

System_CAPS_ICON_note.jpg Note

The Send method listed below is used for both transactional and nontransactional messages (for information on its use in transactions, see Transactions).

The body of a message can be a string, an array of bytes, any numeric date or currency type that a Variant can contain, or any persistent COM object that supports IDispatch and IPersist (IPersistStream, IPersistStreamInit, or IPersistStorage).

The MSMQMessage object defines the following methods.

MethodDescription
MSMQMessage.AttachCurrentSecurityContext(Superseded by AttachCurrentSecurityContext2.) Caches an internal or external certificate and the corresponding private key in a security context structure along with the user's SID and additional security information needed to attach a certificate for sending authenticated messages. Stores the handle to this structure in the object.
MSMQMessage.AttachCurrentSecurityContext2(Introduced in Windows® 2000 Service Pack 2; supersedes MSMQMessage.AttachCurrentSecurityContext.) Caches an internal or external certificate and the corresponding private key in a security context structure along with the user's SID and additional security information needed to attach a certificate for sending authenticated messages. Stores the handle to this structure in the object.
MSMQMessage.SendSends the message to the specified queue.

The MSMQMessage object defines the following properties.

PropertyDescription
MSMQMessage.AckSpecifies the type of acknowledgment messages that Message Queuing returns to the administration queue.

Run-time access: Read/write

Data type: Long
MSMQMessage.AdminQueueInfoSpecifies the queue used for acknowledgment messages.

Run-time access: Read/write

Data type: MSMQQueueInfo
MSMQMessage.AppSpecificSpecifies application-generated information for filtering messages.

Run-time access: Read/write

Data type: Long
MSMQMessage.ArrivedTimeProvides the date and time when the message arrived at the queue. Run-time access: Read-only

Data type: Variant (Date)
MSMQMessage.AuthenticationProviderName(Introduced in MSMQ 2.0.) Specifies the name of the cryptographic provider used to generate the digital signature attached to the message.

Run-time access: Read/write

Data type: String
MSMQMessage.AuthenticationProviderType(Introduced in MSMQ 2.0.) Specifies the type of cryptographic provider used to generate the digital signature attached to the message.

Run-time access: Read/write

Data type: Long
MSMQMessage.AuthLevelSpecifies whether the message should be authenticated and what type of digital signature is used.

Run-time access: Read/write

Data type: Long
MSMQMessage.BodySpecifies the body of the message.

Run-time access: Read/write

Data type: Variant
MSMQMessage.BodyLengthProvides the size of the message body.

Run-time access: Read-only

Data type: Long
MSMQMessage.Class(Superseded by MsgClass.) Provides the type of message.

Run-time access: Read-only

Data type: Long
MSMQMessage.CompoundMessage(Introduced in MSMQ 3.0.) Provides the entire contents of an SRMP message, including the SOAP envelope and the SOAP attachments associated with it.

Run-time access: Read-only

Data type: Variant (array of bytes)
MSMQMessage.ConnectorTypeGuid(Introduced in MSMQ 2.0.) Specifies a connector application identifier. This property is set when some properties typically set by Message Queuing were set by the sending application.

Run-time access: Read/write

Data type: String (GUID format)
MSMQMessage.CorrelationIdSpecifies the correlation identifier of the message.

Run-time access: Read/write

Data type: Variant (array of bytes)
MSMQMessage.DeliverySpecifies how the message is delivered (optimize throughput or recoverability).

Run-time access: Read/write

Data type: Long
MSMQMessage.DestinationProvides the set of destination queues to which the message was originally sent.

Run-time access: Read-only

Data type: MSMQDestination
MSMQMessage.DestinationQueueInfoProvides the queue to which the message is originally sent.

Run-time access: Read-only

Data type: MSMQQueueInfo
MSMQMessage.DestinationSymmetricKey(Introduced in MSMQ 2.0.) Specifies the symmetric key used to encrypt the message.

Run-time access: Read/write

Data type: Variant (array of bytes)
MSMQMessage.EncryptAlgorithmSpecifies the algorithm used to encrypt the message body.

Run-time access: Read/write

Data type: Long
MSMQMessage.Extension(Introduced in MSMQ 2.0.) Specifies additional application-defined information.

Run-time access: Read/write

Data type: Variant (array of bytes)
MSMQMessage.HashAlgorithmSpecifies the hashing algorithm that Message Queuing uses when authenticating the message.

Run-time access: Read/write

Data type: Long
MSMQMessage.IdProvides the MSMQ-generated identifier for the message. Run-time access: Read-only

Data type: Variant (array of bytes)
MSMQMessage.IsAuthenticated(Superseded by IsAuthenticated2.) Indicates whether the message was authenticated at the request of the sending application.

Run-time access: Read-only

Data type: Short
MSMQMessage.IsAuthenticated2(Introduced in MSMQ 3.0, supersedes IsAuthenticated.) Indicates whether the message was authenticated at the request of the sending application.

Run-time access: Read-only

Data type: Boolean
MSMQMessage.IsFirstInTransaction(Introduced in MSMQ 2.0, superseded by IsFirstInTransaction2.) Indicates whether the message was the first message in a transaction.

Run-time access: Read-only

Data type: Short
MSMQMessage.IsFirstInTransaction2(Introduced in MSMQ 3.0, supersedes IsFirstInTransaction.) Indicates whether the message was the first message in a transaction, as a Boolean value.

Run-time access: Read-only

Data type: Boolean
MSMQMessage.IsLastInTransaction(Introduced in MSMQ 2.0, superseded by IsLastInTransaction2.) Indicates whether the message was the last message in a transaction.

Run-time access: Read-only

Data type: Short
MSMQMessage.IsLastInTransaction2(Introduced in MSMQ 3.0, supersedes IsLastInTransaction.) Indicates whether the message was the last message in a transaction, as a Boolean value.

Run-time access: Read-only

Data type: Boolean
MSMQMessage.JournalSpecifies whether a copy of the message is stored in the computer journal.

Run-time access: Read/write

Data type: Long
MSMQMessage.LabelSpecifies an application-defined label for the message.

Run-time access: Read/write

Data type: String
MSMQMessage.LookupId(Introduced in MSMQ 3.0.) Provides the lookup identifier of the message.

Run-time access: Read-only

Data type: Variant (String)
MSMQMessage.MaxTimeToReachQueueSpecifies how long the message has to reach the queue.

Run-time access: Read/write

Data type: Long
MSMQMessage.MaxTimeToReceiveSpecifies how long the receiving application has to remove the message from the queue.

Run-time access: Read/write

Data type: Long
MSMQMessage.MsgClass(Introduced in MSMQ 2.0, supersedes Class.) Specifies the type of message.

Run-time access: Read/write

Data type: Long
MSMQMessage.PrioritySpecifies the priority of the message (where it is placed in the queue).

Run-time access: Read/write

Data type: Long
MSMQMessage.PrivLevelSpecifies whether the message is private (encrypted).

Run-time access: Read/write

Data type: Long
MSMQMessage.ReceivedAuthenticationLevel(Introduced in MSMQ 2.0.) Indicates whether the message was authenticated at the request of the sending application and what type of digital signature was used.

Run-time access: Read-only

Data type: Short
MSMQMessage.ResponseDestination(Introduced in MSMQ 3.0.) Specifies a set of queues used for returning response messages.

Run-time access: Read/write

Data type: MSMQDestination
MSMQMessage.ResponseQueueInfoSpecifies the queue for sending responses to the message.

Run-time access: Read/write

Data type: MSMQQueueInfo
MSMQMessage.SenderCertificateSpecifies the sender certificate. .

Run-time access: Read/write

Data type: Variant (array of bytes)
MSMQMessage.SenderIdIdentifies the user who sent the message.

Run-time access: Read/write

Data type: Variant (array of bytes)
MSMQMessage.SenderIdTypeSpecifies the type of sender identifier found in SenderId.

Run-time access: Read/write

Data type: Long
MSMQMessage.SenderVersion(Introduced in MSMQ 3.0.) Specifies the wire format used to send the message.

Run-time access: Read-only

Data type: Long
MSMQMessage.SentTimeProvides the date and time when the message was sent.

Run-time access: Read-only

Data type: Variant (Date)
MSMQMessage.Signature(Introduced in MSMQ 2.0.) Specifies the MSMQ 1.0 signature or application-generated signature that is attached to the message.

Run-time access: Read/write

Data type: Variant (array of bytes)
MSMQMessage.SoapBody(Introduced in MSMQ 3.0.) Specifies application-generated SOAP body elements for inclusion in the SOAP envelope of an SRMP message.

Run-time access: Write-only

Data type: String
MSMQMessage.SoapEnvelope(Introduced in MSMQ 3.0.) Provides the SOAP envelope (not including binary attachments) of an SRMP message.

Run-time access: Read-only

Data type: String
MSMQMessage.SoapHeader(Introduced in MSMQ 3.0.) Specifies additional application-generated header elements for inclusion in the SOAP envelope of an SRMP message.

Run-time access: Write-only

Data type: String
MSMQMessage.SourceMachineGuidProvides the identifier of the computer where the message originated.

Run-time access: Read-only

Data type: String (GUID format)
MSMQMessage.TraceSpecifies whether the route of the message is traced.

Run-time access: Read/write

Data type: Long
MSMQMessage.TransactionId(Introduced in MSMQ 2.0.) Provides the transaction identifier for the message.

Run-time access: Read-only

Data type: Variant (array of bytes)
MSMQMessage.TransactionStatusQueueInfo(Introduced in MSMQ 2.0.) Provides the transaction status queue.

Run-time access: Read-only

Data type: MSMQQueueInfo

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib

Message Queuing COM Components

Community Additions

ADD
Show: