Compartir a través de


PROPID_M_XACTID (Windows CE 5.0)

Send Feedback

This property indicates which transaction sent the message.

  • Property ID
    PROPID_M_XACTID

  • Type Indicator
    VT_VECTOR | VT_UI1

  • MQPROPVARIANT Field
    caub

  • Property Values
    Identifier of the transaction.

    For a description of a transaction identifier, see the Remarks section.

Remarks

This property is available for MSMQ 2.0 and later.

It is used by receiving applications to verify that a message was sent from a specific transaction.

The transaction identifier is a 20-byte identifier that includes the following:

  • The computer identifier of the sending machine (the first 16 bits)
  • A transaction sequence number (the last 4 bytes)

Transaction identifiers are not guaranteed to be unique because the transaction sequence numbers are not persistent and they start over again at 2^20.

Message Queuing guarantees only that subsequent transactions will have different transaction sequence numbers.

To verify transaction boundaries, use PROPID_M_XACTID with the following properties:

Examples

The following code example shows how PROPID_M_XACTID is specified in the MQMSGPROPS structure.

DWORD dwIdBufferSize = 1024;
UCHAR *pucIdBuffer = (UCHAR *)malloc(dwIdBufferSize);
if (pucIdBuffer == NULL) {
    // Error handling code (not included for clarity)
}
aMsgPropId[i] = PROPID_M_XACTID;    // Property ID
aPropVar[i].vt = VT_VECTOR|VT_UI1;      // Type indicator
aPropVar[i].caub.pElems = (UCHAR*)pucIdBuffer;
aPropVar[i].caub.cElems = dwIdBufferSize;
i++;

See Also

PROPID_M_LAST_IN_XACT

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.