4.1.1 Creating the MESSAGE_PACKETs

To start the connection, the initiator allocates the next free connection identifier; in this instance, it is 0x00000001. The initiator then creates a MESSAGE_PACKET, with the MsgTag field set to MTAG_CONNECTION_REQ (0x00000005) and with the dwUserMsgType field set to 0x00000101 (which is CONNTYPE_PARTNERTM_PROPAGATE as specified in [MS-DTCO]. By definition, the instance that creates the connection always sets the fIsMaster field to 0x00000001, and as this MESSAGE_PACKET structure contains no extra data, the dwcbVarLenData is set to 0x00000000.

The following table displays the first MESSAGE_PACKET structure that the initiator creates (all values are 32-bits wide).

Field

Value

Value description

MsgTag

0x00000005

MTAG_CONNECTION_REQ

fIsMaster

0x00000001

1

dwConnectionId

0x00000001

1

dwUserMsgType

0x00000101

CONNTYPE_PARTNERTM_PROPAGATE

dwcbVarLenData

0x00000000

0

dwReserved1

0xcd64cd64

dwReserved1: 0xcd64cd64

The initiator then creates a second MESSAGE_PACKET to contain the user message. It sets the MsgTag field to MTAG_USER_MESSAGE (0x00000FFF) and the dwUserMsgType field to 0x00002001 (which is PARTNERTM_PROPAGATE_MTAG_PROPAGATE as specified in [MS-DTCO]).

The MESSAGE_PACKET also contains an extra 64 bytes of data for the message body, so it sets the dwcbVarLenData field to 0x00000040. The message body that follows is specific to the message; in this instance, it specifies a transaction ID (guidTx, set to 9fa8a337-eaf7-4230-9232-b57379d65077), a transaction isolation level (isoLevel, set to 0x00100000, which is ISOLATIONLEVEL_SERIALIZABLE), and a transaction description (szDesc, set to the string "Example Transaction - 39 chars long...."). The following table is the second MESSAGE_PACKET structure that the initiator creates.

Field

Value

Value Description

MsgTag

0x00000FFF

MTAG_USER_MESSAGE

fIsMaster

0x00000001

1

dwConnectionId

0x00000001

1

dwUserMsgType

0x00002001

PARTNERTM_PROPAGATE_MTAG_PROPAGATE

dwcbVarLenData

0x00000040

64

dwReserved1

0xcd64cd64

dwReserved1: 0xcd64cd64

  • guidTx

  • 0x9fa8a337

  • 0x4230eaf7

  • 0x73b53292

  • 0x7750d679

  • 9fa8a337-eaf7-4230-9232-b57379d65077

isoLevel

0x00100000

ISOLATIONLEVEL_SERIALIZABLE

  • szDesc

  • 0x6d617845

  • 0x20656c70

  • 0x6e617254

  • 0x74636173

  • 0x206e6f69

  • 0x3933202d

  • 0x61686320

  • 0x6c207372

  • 0x2e676e6f

  • 0x002e2e2e

  • "Example Transaction - 39 chars long...."

To send these MESSAGE_PACKETs, the initiator wraps the two messages into a single boxcar, which is in turn passed to the instance of the underlying transports protocol specified in [MS-CMPO], as specified in sections 2.1.1.3 and 3.1.7.1.