See Also Examples Applies To
Returns as numeric, the current value of a TWAIN capability.
Syntax
object.TwainGetCapCurrentNumeric (nCap, *nCurrentValue)
The TwainGetCapCurrentNumeric syntax has these parts:
| Part | Description |
| object | Required. An object expression that evaluates to an object in the Applies To list. |
| nCap | Required. Long A TWAIN capabilities constant. |
| *nCurrentValue | Required. Double. Output current value of the selected TWAIN capability. |
Returns
Boolean. True if success, else False -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() functions for diagnosing the error.
Remarks
Before using this function check that the TWAIN state is >= 4 (TWAIN_SOURCE_OPEN)
To get the TWAIN state, use the TwainGetState() function.
This fuction can be used to retrieve the folowing types of capabilities: TWTY_INT8, TWTY_INT16, TWTY_INT32, TWTY_UINT8, TWTY_UINT16, TWTY_UINT32, TWTY_BOOL.
You can determine the type of each TWAIN capability using the TwainGetCapItemType function or looking the twain references from http://www.twain.org
Category
TWAIN Functions
Visual Basic Sample
Catch the acquition bitdepth used by the default source
Dim nCurrentCapValue As Double
Object.TwainOpenDefaultSource
Call Object.TwainGetCapCurrentNumeric(ICAP_BITDEPTH, nCurrentCapValue)
MsgBox "The current bitdepth is: " + str(nCurrentCapValue)
Object.TwainCloseSource