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. |
This read-only property identifies the message using an MSMQ-generated message identifier.
Syntax
HRESULT get_HashAlgorithm( VARIANT* pvarMsgId ); |
Parameters
- pvarMsgId
-
20-byte message identifier (array of bytes).
Return Value
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
Message Queuing generates a 20-byte message identifier when the message is sent. This includes application-generated messages sent by applications and system-generated messages sent by Message Queuing.
The message identifier is composed of the machine GUID of the sending computer plus an additional identifier that is unique to the computer. By combining these two components, the message identifier is unique for each message.
Sending messages to multiple destinations
When messages are sent to multiple destinations by means of distribution lists, multicast addresses, and multiple-element format names, only one identifier is generated for all the messages sent.
For example, if a distribution list is used to send a message to three destinations all three messages will have the same message identifier.
To distinguish between messages with the same identifier, the application looking at the messages must also check the unique destination of each message.
Message identifiers in acknowledgment messages
When an acknowledgment message is created, the message identifier of the original message can be found in the MSMQMessage.CorrelationIdproperty of the acknowledgment message.
Message identifiers in response messages
When sending response messages, MSMQMessage.CorrelationIdcan be set to the message identifier of the message that is in the queue. This provides an easy mechanism that the sending application can use to match the response message with the message that was sent.
Visual Basic arrays
When dimensioning arrays for the message identifier, always set the lower boundary of the array to 0.
When filling in the identifier, Message Queuing sets the lower boundary of the returned byte-array to 0 regardless of what boundary was set by the application.
Equivalent Function property
When using functions, the identifier of the message can be set and retrieved using the PROPID_M_MSGIDproperty.
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 |