4.1.2 Creating a Boxcar

A Boxcar always begins with a BOX_CAR_HEADER structure (section 2.2.1). The first two fields (dwSeqNumThisCar and dwAckSeqNum) are reserved and are always set to zero. The third field (dwcbTotal) contains the total number of bytes in the Boxcar (in this case, 0x00000080; 128 bytes.) The fourth field (dwcMessages) contains the total number of MESSAGE_PACKETs in the BOX_CAR_HEADER (in this case, 2).

The rest of the Boxcar contains an array of MESSAGE_PACKET structures. In this example, the two MESSAGE_PACKET structures from section 4.1.1 are included in this Boxcar. Note that individual MESSAGE_PACKET structures are aligned to 8-byte boundaries, and that they are present in the order that they are intended to be processed. The following is the final Boxcar structure.

Field

Value

Value description

dwSeqNumThisCar

0x00000000

dwSeqNumThisCar: 0

dwAckSeqNum

0x00000000

dwAckSeqNum: 0

dwcbTotal

0x00000080

dwcbTotal: 128

dwcMessages

0x00000002

dwcMessages: 2

MsgTag

0x00000005

MTAG_CONNECTION_REQ

fIsMaster

0x00000001

1

dwConnectionId

0x00000001

1

dwUserMsgType

0x00000101

CONNTYPE_PARTNERTM_PROPAGATE

dwcbVarLenData

0x00000000

0

dwReserved1

0xcd64cd64

dwReserved1: 0xcd64cd64

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

  • 0x00000000

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

  • Padding