Rechercher une page de manuel
VarNumFromParseNum.3w
Langue: en
Version: Jun 2009 (debian - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
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 "dlls/oleaut32/variant.c".
Debug channel "variant".
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre