Managing the TWAIN Source
Once the user has established a handle to a TWAIN session, the TWAIN source to use for acquiring images should be selected. To determine the TWAIN sources available on the system, LEADTOOLS provides the L_TwainGetSources function. This function enumerates all available TWAIN sources and calls the LTWAINSOURCEINFOCALLBACK callback function for each TWAIN source found.
To select the TWAIN source to use for acquiring images, call the L_TwainSelectSource function.
Each TWAIN source has certain capabilities. The user may wish to alter these capability settings before acquiring images from the TWAIN source. For more information on this, refer to Getting and Setting Capabilities.
LEADTOOLS TWAIN toolkit also provides functions to manage the TWAIN sources installed on the system:
L_TwainSelectSource displays a dialog that lists all available TWAIN sources installed on the system. This dialog lets the user select the TWAIN source he or she wants to use.
L_TwainGetSources function is used to enumerate either all available TWAIN sources, or the currently selected TWAIN source, and retrieve the name, product family name and manufacturer name of the source(s). The LTWAINSOURCEINFOCALLBACK is called for each TWAIN source enumerated.