DTWAIN_RangeGetCount

Top  Previous  Next

The DTWAIN_RangeGetCount function gets the number of items that the DTWAIN_RANGE defines.

 

LONG DTWAIN_RangeGetCount ( DTWAIN_RANGE Range );

 

 

Parameters

Range

A valid DTWAIN_RANGE type.

 

Return Values

If the function succeeds, the number of values defined by the DTWAIN_RANGE is returned.  If the function fails, DTWAIN_FAILURE1 is returned.

 

Comments

The DTWAIN_RangeGetCount function gets the number of items that the DTWAIN_RANGE Range defines.  The minimum, maximum, and step size values defined by Range are used to compute the number of values.  For example if the DTWAIN_RANGE has the following characteristics:

 

Minimum Value = -10

Maximum Value = 10

Step size = 2

 

The total number of values that will be returned by DTWAIN_RangeGetCount will be 11, since the range encompasses the following values:

 

-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10

 

There are 11 values defined by the range (-10, 10) with a step of 2.

 

This function can be used to get the number of values that will be generated when the DTWAIN_RangeExpand function is called.

 

TWAIN State Transitions

None.

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

See Also

DTWAIN Range Functions