DTWAIN_RangeGetValue

Top  Previous  Next

The DTWAIN_RangeGetValue function gets either the low, high, step, default, or current values in the DTWAIN_RANGE.

 

DTWAIN_BOOL DTWAIN_RangeGetValue (

DTWAIN_RANGE

Range,

LONG

WhichValue,

LPVOID

lpValue );

 

Parameters

Range

A valid DTWAIN_RANGE type.

 

WhichValue

Value to retrieve.

 

lpValue

Address of where retrieved value will be copied.

 

 

Return Values

If the function succeeds, TRUE is returned.  If the function fails FALSE is returned.

 

Comments

The DTWAIN_RangeGetValue function retrieves a value from the DTWAIN_RANGE Range.  The WhichValue denotes the value from the DTWAIN_RANGE that is to be retrieved.  The WhichValue can be one of the following:

 

Constant

Value

Defintion

DTWAIN_RANGEMIN

1

Minimum value

DTWAIN_RANGEMAX        

2

Maximum value

DTWAIN_RANGESTEP        

3

Step size

DTWAIN_RANGEDEFAULT

4

Default value

DTWAIN_RANGECURRENT

5

Current value

 

The lpValue is the address of where the retrieved data will be copied.  Since DTWAIN_RANGEs can differ in data types, the caller to this function is responsible in seeing that the data type residing at lpValue matches the data type stored in Range.

 

To get all the values that define the DTWAIN_RANGE with a single function call, use the DTWAIN_RangeGetAll function.

 

TWAIN State Transitions

None.

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

See Also

DTWAIN Range Functions