L_TwainSelectSource

#include "lttwn.h"

L_LTTWN_API L_INT L_TwainSelectSource (hSession, pltSource)

HTWAINSESSION hSession;

handle to an existing TWAIN session

pLTWAINSOURCE pltSource;

pointer to a structure

Displays the TWAIN dialog box to be used to select a TWAIN source for acquiring images.

Parameter

Description

hSession

Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession or L_TwainInitSession2 function.

pltSource

Pointer to a structure containing the name of the TWAIN source to select.

Returns

SUCCESS

The function was successful.

! = SUCCESS

An error occurred. Refer to Return Codes.

Comments

LEADTOOLS TWAIN toolkits support both the TWAIN 1.9 and the TWAIN 2.x specifications.

After establishing the TWAIN session handle by calling either L_TwainInitSession or L_TwainInitSession2, select the TWAIN source for acquiring images by calling L_TwainSelectSource. For more information, refer to Managing the TWAIN Source.  

Pass NULL for the pltSource parameter to display the default TWAIN Select Source dialog provided by the TWAIN Working Group.

To select a device programmatically, set LTWAINSOURCE.pszTwainSourceName equal to the name of the desired device and then pass the address of the LTWAINSOURCE structure for the pltSource parameter.

The default behavior for L_TwainSelectSource is to determine whether the TWAIN 2.x DLL is loaded on the system. If it is, the toolkit tries to load it. If loading TWAIN 2.x fails or if the scanner is not compatible with TWAIN 2.x, the LEADTOOLS TWAIN toolkit will try to start TWAIN 1.9.

Call L_TwainSetVersion to override the default behavior of L_TwainSelectSource, as follows:

Call L_TwainGetVersion to determine which TWAIN specification is currently being used by the LEADTOOLS TWAIN toolkit.   

Call L_TwainGetSources to get information available for either all TWAIN sources (or the currently selected TWAIN source) installed on the system. 

Required DLLs and Libraries

LTTWN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files to be Included with your Application.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS TWAIN C API Help