The DECIMAL typedef structure is an exact numeric value with a fixed precision and fixed scale, stored in the same way as in OLE Automation. The DECIMAL typedef structure is defined as follows:
typedef struct tagDECIMAL {
USHORT wReserved;
union {
struct {
BYTE scale;
BYTE sign;
};
USHORT signscale;
};
ULONG Hi32;
union {
struct {
ULONG Lo32;
ULONG Mid32;
};
ULONGLONG Lo64;
};
} DECIMAL;
For example, to specify the number 12.345, the scale is 3, the sign is 0, and the number stored in the 12-byte integer is 12345.