MSMQMessage
The MSMQMessage object provides access to the properties that define a message and the methods used to send the message to its destination queue.
Note |
|---|
| The Send method listed below is used for both transactional and nontransactional messages (for information on its use in transactions, see Message Queuing 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).
Methods
The MSMQMessage object defines the following methods.
| Method | Description |
|---|---|
|
(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. |
|
|
(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. |
|
|
Sends the message to the specified queue. |
Properties
The MSMQMessage object defines the following properties.
| Property | Description |
|---|---|
|
Specifies the type of acknowledgment messages that Message Queuing returns to the administration queue. Run-time access: Read/write Data type: Long |
|
|
Specifies the queue used for acknowledgment messages. Run-time access: Read/write Data type: MSMQQueueInfo |
|
|
Specifies application-generated information for filtering messages. Run-time access: Read/write Data type: Long |
|
|
Provides the date and time when the message arrived at the queue. Run-time access: Read-only Data type: Variant (Date) |
|
|
(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 |
|
|
(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 |
|
|
Specifies whether the message should be authenticated and what type of digital signature is used. Run-time access: Read/write Data type: Long |
|
|
Specifies the body of the message. Run-time access: Read/write Data type: Variant |
|
|
Provides the size of the message body. Run-time access: Read-only Data type: Long |
|
|
(Superseded by MsgClass.) Provides the type of message. Run-time access: Read-only Data type: Long |
|
|
(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) |
|
|
(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) |
|
|
Specifies the correlation identifier of the message. Run-time access: Read/write Data type: Variant (array of bytes) |
|
|
Specifies how the message is delivered (optimize throughput or recoverability). Run-time access: Read/write Data type: Long |
|
|
Provides the set of destination queues to which the message was originally sent. Run-time access: Read-only Data type: MSMQDestination |
|
|
Provides the queue to which the message is originally sent. Run-time access: Read-only Data type: MSMQQueueInfo |
|
|
(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) |
|
|
Specifies the algorithm used to encrypt the message body. Run-time access: Read/write Data type: Long |
|
|
(Introduced in MSMQ 2.0.) Specifies additional application-defined information. Run-time access: Read/write Data type: Variant (array of bytes) |
|
|
Specifies the hashing algorithm that Message Queuing uses when authenticating the message. Run-time access: Read/write Data type: Long |
|
|
Provides the MSMQ-generated identifier for the message. Run-time access: Read-only Data type: Variant (array of bytes) |
|
|
(Superseded by IsAuthenticated2.) Indicates whether the message was authenticated at the request of the sending application. Run-time access: Read-only Data type: Short |
|
|
(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 |
|
|
(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 |
|
|
(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 |
|
|
(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 |
|
|
(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 |
|
|
Specifies whether a copy of the message is stored in the computer journal. Run-time access: Read/write Data type: Long |
|
|
Specifies an application-defined label for the message. Run-time access: Read/write Data type: String |
|
|
(Introduced in MSMQ 3.0.) Provides the lookup identifier of the message. Run-time access: Read-only Data type: Variant (String) |
|
|
Specifies how long the message has to reach the queue. Run-time access: Read/write Data type: Long |
|
|
Specifies how long the receiving application has to remove the message from the queue. Run-time access: Read/write Data type: Long |
|
|
(Introduced in MSMQ 2.0, supersedes Class.) Specifies the type of message. Run-time access: Read/write Data type: Long |
|
|
Specifies the priority of the message (where it is placed in the queue). Run-time access: Read/write Data type: Long |
|
|
Specifies whether the message is private (encrypted). Run-time access: Read/write Data type: Long |
|
|
(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 |
|
|
(Introduced in MSMQ 3.0.) Specifies a set of queues used for returning response messages. Run-time access: Read/write Data type: MSMQDestination |
|
|
Specifies the queue for sending responses to the message. Run-time access: Read/write Data type: MSMQQueueInfo |
|
|
Specifies the sender certificate. . Run-time access: Read/write Data type: Variant (array of bytes) |
|
|
Identifies the user who sent the message. Run-time access: Read/write Data type: Variant (array of bytes) |
|
|
Specifies the type of sender identifier found in SenderId. Run-time access: Read/write Data type: Long |
|
|
(Introduced in MSMQ 3.0.) Specifies the wire format used to send the message. Run-time access: Read-only Data type: Long |
|
|
Provides the date and time when the message was sent. Run-time access: Read-only Data type: Variant (Date) |
|
|
(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) |
|
|
(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 |
|
|
(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 |
|
|
(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 |
|
|
Provides the identifier of the computer where the message originated. Run-time access: Read-only Data type: String (GUID format) |
|
|
Specifies whether the route of the message is traced. Run-time access: Read/write Data type: Long |
|
|
(Introduced in MSMQ 2.0.) Provides the transaction identifier for the message. Run-time access: Read-only Data type: Variant (array of bytes) |
|
|
(Introduced in MSMQ 2.0.) Provides the transaction status queue. Run-time access: Read-only Data type: MSMQQueueInfo |
Requirements
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
Note