TwainGetAvailableCapValuesString Method

See Also     Examples     Applies To

Sets into an array the available values (as string) for the selected TWAIN capability which can be used with it 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.TwainGetAvailableCapValuesString (nCap, *arValues())

The TwainGetAvailableCapValuesString 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.
*arValues() Required. Output 1D (0 based) String Array. The available values wich can be set for the specified capability.

Returns

Long. If Success, non zéro: Number of values available for the selected TWAIN capability. Else 0 if fail -> 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 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

Category

TWAIN Functions

Visual Basic Sample

list names of the halftone patterns supported by the default source


Dim nCpt As Long
Dim arCapValues() As String

Object.TwainOpenDefaultSource
For nCpt = 0 To Object.TwainGetAvailableCapValuesString(ICAP_HALFTONES, arCapValues) - 1
    MsgBox "Supported value no: " + str(nCpt + 1) + " are: " + arCapValues(nCpt)
Next nCpt

Object.TwainCloseSource






© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.