2.2.3.7 CPMGetRowsOut

The CPMGetRowsOut message replies to a CPMGetRowsIn message with the rows of a search query. Protocol servers MUST format offsets to variable-length data types in the row field as follows.

  • The protocol client indicated it was a 32-bit system (0x00000102 or 0x00000103 in the _iClientVersion field of CPMConnectIn): Offsets are 32-bit integers.

  • The protocol client indicated it was a 64-bit system (_iClientVersion set to 0x00010102 or 0x00010103 in CPMConnectIn), and the protocol server indicated that it was a 32-bit system (_serverVersion set to 0x00000102 or 0x00000103 in CPMConnectOut): Offsets are 32-bit integers.

  • The protocol client indicated it was a 64-bit system (_iClientVersion set to 0x00010102 or 0x00010103 in CPMConnectIn), and the protocol server indicated that it was a 64-bit system (_serverVersion set to 0x00010102 or 0x00010103 in CPMConnectOut): Offsets are 64-bit integers.

The format of the CPMGetRowsOut message that follows the header is depicted in the following diagram.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

_cRowsReturned

Reserved0

Reserved2

Reserved1

paddingRows (variable)

...

Rows (variable)

...

_cRowsReturned (4 bytes): A 32-bit unsigned integer indicating the number of rows returned in the Rows field.

Reserved0 (4 bytes): A 32-bit reserved field. MUST be set to 0x000000.

Reserved2 (4 bytes): A 32-bit reserved field. MUST be ignored by the receiver.

Reserved1 (4 bytes): A 32-bit reserved field. MUST be ignored by the receiver.

paddingRows (variable): This field MUST be of sufficient length (0 to _cbReserved-1 bytes) to pad the Rows field to _cbReserved offset from the beginning of a message where _cbReserved is the value in the CPMGetRowsIn message. Padding bytes used in this field can be any arbitrary value. This field MUST be ignored by the receiver.

Rows (variable): Row data is formatted as prescribed by column information in the most recent CPMSetBindingsIn message. Rows MUST be stored in forward order (for example, row 1 before row 2). Fixed-sized columns MUST be stored at the offsets specified by the most recent CPMSetBindingsIn message.

Columns MUST be stored as CRowVariants with vType set to VT_I4 or VT_LPWSTR. Because the total size of the Rows field is specified by the _cbReadBuffer field of the CPMGetRowsIn message, if row data does not fit exactly into the Rows field of the CPMGetRowsOut message then there will be unused padding within the Rows field.