VarNumFromParseNum(3w)
NAME
VarNumFromParseNum (OLEAUT32.47)
SYNOPSIS
HRESULT VarNumFromParseNum ( NUMPARSE* pNumprs, BYTE* rgbDig, ULONG dwVtBits, VARIANT* pVarDst )
DESCRIPTION
Convert a NUMPARSE structure into a numeric Variant type.
PARAMS
pNumprs [In] Source for parsed number. cDig must be set to the size of
rgbDig.
rgbDig [In] Source for the numbers digits.
dwVtBits [In] VTBIT_ flags from "oleauto.h" indicating the acceptable
dest types.
pVarDst [Out] Destination for the converted Variant value.
RETURNS
Success: S_OK. pVarDst contains the converted value.
Failure: E_INVALIDARG, if any parameter is invalid. DISP_E_OVERFLOW, if
the number is too big for the types set in dwVtBits.
NOTES
- The smallest favoured type present in dwVtBits that can represent the
number in pNumprs without losing precision is used.
- Signed types are preferred over unsigned types of the same size.
- Preferred types in order are: integer, float, double, currency then
decimal.
- Rounding (dropping of decimal points) occurs without error. See VarI8FromR8(3w) for details of the rounding method.
- pVarDst is not cleared before the result is stored in it.
- WinXP and Win2003 support VTBIT_I8, VTBIT_UI8 but that's buggy (by design?): If some other VTBIT's for integers are specified together with VTBIT_I8 and the number will fit only in a VT_I8 Windows(tm) will "cast" the number to the smallest requested integer truncating this way the number. Wine doesn't implement this "feature" (yet?).
IMPLEMENTATION
Defined in "oleauto.h".
Implemented in "build/buildd-wine-unstable_1.1.32-1+b1-amd64-KnxYu0/wine-unstable-1.1.32/build32/dlls/oleaut32/variant.c".
- Debug channel "variant".