The following specifies groupable data types of fixed length:
FIXED_LEN_VTDATA_GROUPABLE =
( VT_EMPTY ) /
( VT_NULL ) /
( VT_I2 WORD ) /
( VT_I4 LONG ) /
( VT_R4 FLOAT ) /
( VT_R8 DOUBLE ) /
( VT_CY CY ) /
( VT_DATE DATEVAL ) /
( VT_BOOL BOOLVAL ) /
( VT_UI1 BYTE ) /
( VT_DECIMAL DECIMAL )
-
VT_CY: Currency is a fixed-point number with four digits to the right of the decimal point. It is stored in an 8-byte signed integer, scaled by 10,000. The syntax of CY is as follows:
CY = CYLOW CYHI
CYLOW = LONG
CYHI = ULONG
-
VT_BOOL: A two-byte value that corresponds and encodes two states of true and false. By convention %x00.00, it corresponds to a value of "true". The related definition is as follows:
BOOLVAL = %xFF.FF / %x00.00
-
VT_DATE: DATEVAL is a Double, the whole part of which is the number of days since December 30, 1899, and the fractional part is the fraction of a day. For example, the number 2.25 represents the date and time January 1, 1900, at 6:00AM.
-
DECIMAL:
datatype identifier: VT_DECIMAL
A DECIMAL specifies a decimal value, a number in decimal exponential notation with a fixed precision of 12 bytes. The decimal value is specified according to the following rules:
-
The decimal value's sign MUST be negative if the value of the DECIMALSign field is DECIMALNegative, and positive or zero otherwise.
-
The decimal value's absolute value is specified by the following formula, in which v is the decimal value, s is the value of DECIMALScale, and m is the value of the mantissa: |v| = 10^(-s)*m
The syntax of DECIMAL is as follows:
DECIMAL = 2ZEROBYTE DECIMALScale DECIMALSign DECIMALMantissa
-
DECIMALScale: The exponent of the decimal ranges from 0 to 28.
-
DECIMALSign: Specifies the sign of the decimal value.
DECIMALSign = DECIMALPositive / DECIMALNegative
DECIMALPositive = %x00
DECIMALNegative = %x80
-
DECIMALMantissa: A 12-byte, unsigned integer that specifies the mantissa of the decimal value. The range of the mantissa is 0-2^96.
DECIMALMantissa = DECIMALHigh DECIMALLow DECIMALMid
-
DECIMALHigh: The most significant 4 bytes of the mantissa.
-
DECIMALLow: The least significant 4 bytes of the mantissa.
-
DECIMALMid: The middle 4 bytes of the mantissa.