VarI8FromR8 (OLEAUT32.336)
HRESULT VarI8FromR8 ( double dblIn, LONG64* pi64Out )
Convert a VT_R8 to a VT_I8.
dblIn | [In] | Source. |
pi64Out | [Out] | Destination. |
Success: S_OK.
Failure: E_INVALIDARG, if the source value is invalid DISP_E_OVERFLOW, if the value will not fit in the destination.
Only values that fit into 63 bits are accepted. Due to rounding issues, very high or low values will not be accurately converted.
Numbers are rounded using Dutch rounding, as follows:
Fractional Part Sign Direction Example --------------- ---- --------- ------- < 0.5 + Down 0.4 -> 0.0 < 0.5 - Up -0.4 -> 0.0 > 0.5 + Up 0.6 -> 1.0 < 0.5 - Up -0.6 -> -1.0 = 0.5 + Up/Down Down if even, Up if odd = 0.5 - Up/Down Up if even, Down if odd.
This system is often used in supermarkets.
Declared in "include/oleauto.h". gitlab.winehq.org/wine/wine/blob/master/include/oleauto.h
Implemented in "dlls/oleaut32/vartype.c". gitlab.winehq.org/wine/wine/blob/master/dlls/oleaut32/vartype.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.