VarNumFromParseNum (OLEAUT32.47)
HRESULT VarNumFromParseNum ( NUMPARSE* pNumprs, BYTE* rgbDig, ULONG dwVtBits, VARIANT* pVarDst )
Convert a NUMPARSE structure into a numeric Variant type.
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. |
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.
- 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 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® will "cast" the number to the smallest requested integer truncating this way the number. Wine doesn't implement this "feature" (yet?).
Declared in "include/oleauto.h". gitlab.winehq.org/wine/wine/blob/master/include/oleauto.h
Implemented in "dlls/oleaut32/variant.c". gitlab.winehq.org/wine/wine/blob/master/dlls/oleaut32/variant.c
Debug channel "variant".
Copyright © 2024 The Wine Project. All trademarks are the property of their respective owners. Visit WineHQ for license details. Generated Nov 2024.