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 preferrred 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.
Defined in "oleauto.h".
Implemented in "dlls/oleaut32/variant.c". source.winehq.org/source/dlls/oleaut32/variant.c
Debug channel "variant".
Copyright © 2005 The Wine Project. All trademarks are the property of their respective owners. Visit WineHQ for license details. Generated Aug 2005.