See Also Examples Applies To
Returns as string, the current value of a TWAIN capability.
Syntax
object.TwainGetCapCurrentString (nCap, *sCurrentValue)
The TwainGetCapCurrentString 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. |
| *sCurrentValue | Required. String. 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_STR32, TWTY_STR64, TWTY_STR128, TWTY_STR255, TWTY_STR1024, TWTY_UNI512.
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
Gets the current halftone pattern used by the default source
Dim sCurrentCapValue As String
object.TwainOpenDefaultSource
Call object.TwainGetCapCurrentString(ICAP_HALFTONES, sCurrentCapValue)
MsgBox "The current halftone pattern used: " + sCurrentCapValue
object.TwainCloseSource