2.2.1.41 CTableVariant

The CTableVariant structure contains the fixed-size portion of a variable length data type stored in the CPMGetRowsOut message.


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

vType

reserved1

reserved2

Count (variable)

...

Offset (variable)

...

vType (2 bytes): A type indicator, indicating the type of vValue. It MUST be one of the values under the vType field, as specified in section 2.2.1.1.

reserved1 (2 bytes): Not used. Can be set to any arbitrary value when sent and it MUST be ignored on receipt.

reserved2 (4 bytes): Not used. Can be set to any arbitrary value when sent and it MUST be ignored on receipt.

Count (variable):  Element count. This field is 4 bytes and is present only if the vType is a VT_VECTOR.

Offset (variable): Only applies to string type (VT_VARIANT, VT_LPSTR, VT_LPWSTR, VT_BSTR, or VT_VECTORs or VT_ARRAYs of those base types). This MUST be a 32-bit value (4 bytes long) if 32-bit offsets are being used (per the rules in section 2.2.3.12), or a 64-bit value (8 bytes long) if 64-bit offsets are being used.

Value: Other data types should put value in place rather than count/offset.

VT_DECIMAL (see section 2.2.1.1.1.1) type: Size of value field is 4 bytes.

All other types: Size of value field is 8 bytes.