How to Work with the Containers – Visual Basic

Due to differences in Visual Basic and MFC, LEADTOOLS provides interfaces specifically for working with containers in VB. These are discussed here.

When getting or setting capability information it may be necessary to create a container for the capability. The structure of the container depends on the type of information in the container. LEADTOOLS supports the following types of TWAIN containers:

L_TWON_ARRAY

L_TWON_ENUMERATION

L_TWON_ONEVALUE

L_TWON_RANGE

For more information on these container types, refer to the TWAIN 1.9 Specification, available at www.twain.org.

The LEADTOOLS TWAIN toolkit provides an interface for each container type and the TW_CAPABILITY structure.

The ILEADTwainCapability interface represents the capabilities; so to get the TW_CAPABILITY, use the CapInfo property, which contains an ICapability2 interface that represents the TW_CAPABILITY structure. This interface has three properties that are used to get and set capabilities:

The ICapabilityOneValue2 interface represents a container of type TW_ONEVALUE. This interface has the following properties:

The ICapabilityEnumeration2 interface represents a container of type TW_ENUMERATION. This interface has the following properties:

The ICapabilityRange2 interface represents a container of type TW_RANGE. This interface has the following properties:

The ICapabilityArray2 interface represents a container of type TW_ARRAY. This interface has the following properties:

The ItwFrame interface represents a structure of type TW_FRAME. It contains information about the area of the image to acquire. This interface has the following properties: