This function converts the parsed number to a number of the VARIANT type.
HRESULT VarNumFromParseNum( NUMPARSE* pnumprs, unsigned char* rgbDig, unsigned long dwVtBits, VARIANT* pvar );
[in] Parsed results.
The cDig member of this structure equals the size of rgbDig.
[in] Contains the values of the digits.
The cDig member of NUMPARSE contains the number of digits.
[in] Contains one bit set for each type that is acceptable as a return value (in many cases, just one bit).
The following VarNumFromParseNum flags indicate acceptable result types:
Type can be CHAR.
Type can be unsigned char.
Type can be short.
Type can be USHORT.
Type can be long.
Type can be ULONG.
Type can be float.
Type can be double.
Type can be CURRENCY.
Type can be DECIMAL.
[out] Pointer to the result variant.
Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.
For rounding decimal numbers, the digit array must be at least one digit longer than the maximum required for data types.
The maximum number of digits required for the DECIMAL data type is 29, so the digit array must have room for 30 digits.
There must also be enough digits to accept the number in octal, if that parsing option is selected. (Hexadecimal and octal numbers are limited by VarNumFromParseNum to the magnitude of an unsigned long [32 bits], so they need 11 octal digits.)