DTWAIN_RangeGetNearestValueFloatString

DTWAIN_RangeGetNearestValueFloatStringA

DTWAIN_RangeGetNearestValueFloatStringW

Top  Previous  Next

The DTWAIN_RangeGetNearestValueFloatString function gets the range value that is closest to a given value.

 

DTWAIN_BOOL DTWAIN_RangeGetNearestValueFloatString (

DTWAIN_RANGE

Range,

DTWAIN_FLOAT

ValueIn,

LPTSTR

pValueOut,

LONG

RoundType );

 

Parameters

Range

 A valid DTWAIN_RANGE type.

 

ValueIn

Value to search for.

 

pValueOut

 Address where nearest value will be stored on return of DTWAIN_RangeGetNearestValueFloat.

 

RoundType

    Determines whether to round to the nearest range value, round up to the next range value, or round down to the previous range value.

 

Return Values

TRUE if successful, FALSE otherwise.  If the function returns FALSE, call DTWAIN_GetLastError() to get extended information.


Character specific versions

ANSI version:

DTWAIN_RangeGetNearestValueFloatStringA

Unicode version:

DTWAIN_RangeGetNearestValueFloatStringW

 

Comments

DTWAIN_RangeGetNearestValueFloatString works the same as DTWAIN_RangeGetNearestValueFloat, with the difference being the floating point value is copied to the string buffer pValueOut.


This function can be used by computer languages that do not handle 64-bit IEEE parameters correctly.  The string buffers (if they are not NULL) must be sized to at least 255 characters.

 

TWAIN State Transitions

None.

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

See Also

DTWAIN Range Functions