TwainGetAvailableCapValueNoString Method

See Also     Examples     Applies To

Returns an available string value for the selected TWAIN capability which can be used by the opened source in its current configuration.
This function should be used to determine what are the supported value which can be used with the TwainSetCapCurrentString() function.

Syntax

object.TwainGetAvailableCapValueNoString (nCap, nNumber)

The TwainGetAvailableCapValueNoString 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 capability constant.
nNumber Required. Long. Index of the available value. Must be a value between 1 and TwainGetAvailableCapValuesCount() returned value.

Returns

Double. The selected available value of the selected TWAIN capability.

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 set 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

list names of the halftone patterns supported by the default source


Dim nCpt As Long
Dim sAvailableCapValue As String

Object.TwainOpenDefaultSource
For nCpt = 1 To Object.TwainGetAvailableCapValuesCount(ICAP_HALFTONES)
    sAvailableCapValue = Object.TwainGetAvailableCapValueNoString(ICAP_HALFTONES, nCpt)
    MsgBox "Supported value no: " + str(nCpt) + " are: " + sAvailableCapValue
Next nCpt

Object.TwainCloseSource






© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.