Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS TWAIN C DLL Help

How to Work with the Containers

Show in webframe

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

LEAD provides specific functions for creating each type of container:

The value in a container can be changed once the user has a pointer to the container. To change the value of a container, the user can call L_TwainLockContainer, make the desired changes to the container value(s), and then call L_TwainUnlockContainer. Alternately, the user can accomplish the same thing by calling the C DLL GlobalLock and GlobalUnlock functions.

When the created container is no longer needed, it should be freed by calling L_TwainFreeContainer.

LEAD provides a number of functions for getting container values, based on the data type of the value. To get the data type of the value in a container, call L_TwainGetNumericContainerItemType. Once the type is known, the following functions can be used to get the container value(s) from the TW_CAPABILITY structure:

L_TwainGetNumericContainerINTValue

L_TwainGetNumericContainerUINTValue

L_TwainGetNumericContainerFIX32Value

L_TwainGetNumericContainerFRAMEValue

L_TwainGetNumericContainerSTRINGValue

L_TwainGetNumericContainerUNICODEValue

L_TwainGetNumericContainerBOOLValue

To get the available values for a specific TWAIN capability, call L_TwainQueryProperty. This function takes a pointer to a LTWAINPROPERTYQUERY structure, which will be updated with the available values for the capability.

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

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.