DTWAIN_ArrayConvertFix32ToFloat |
Top Previous Next |
The DTWAIN_ArrayConvertFix32ToFloat creates a DTWAIN_ARRAY of DTWAIN_FLOAT values from a DTWAIN_ARRAY of fixed point values.
DTWAIN_ARRAY DTWAIN_ArrayConvertFix32ToFloat ( DTWAIN_ARRAY Array )
Parameters Array A DTWAIN_ARRAY that holds fixed point values.
Return Values If the function succeeds, a new DTWAIN_ARRAY is returned that contains DTWAIN_FLOAT values. Otherwise, NULL is returned.
Comments The DTWAIN_ArrayConvertFix32ToFloat function returns a new DTWAIN_ARRAY that holds DTWAIN_FLOAT values that are equivalent to the fixed point values in the DTWAIN_ARRAY that was passed in.
A DTWAIN_ARRAY of fixed point values can be used to set or get entries that represent floating point values, but instead the fixed point entry will use integers to represent the whole number and decimal portions of the floating point number. If DTWAIN_ArrayConvertFix32ToFloat succeeds, the original DTWAIN_ARRAY of fixed point values that was passed to DTWAIN_ArrayConvertFix32ToFloat is destroyed and no longer can be used.
This function is useful if the computer language used to write your application doesn't use or handle DTWAIN_FLOAT variable types correctly, and you want to call DTWAIN functions that return or use DTWAIN_FLOAT values (for example DTWAIN_SetCapValues for capabilities that require floating point values). See these examples for usage of this and other functions that handle floating point data.
Since most computer languages handle DTWAIN_FLOATS with no issues, the DTWAIN_ArrayConvertFix32ToFloat should rarely be used, if it is ever used.
To convert a DTWAIN_ARRAY of DTWAIN_FLOAT values to a DTWAIN_ARRAY of fixed point values, use the DTWAIN_ArrayConvertFloatToFix32 function. To set/get each of the components (whole and fractional) an entry in the DTWAIN_ARRAY of fixed point values, use the DTWAIN_ArrayFix32SetAt and DTWAIN_ArrayFix32GetAt functions.
TWAIN State Transitions None.
Prerequisite Function Call(s)
|