#include "lttwn.h"
L_LTTWN_API L_INT L_TwainAcquireList (hSession, hBitmap, lpszTemplateFile, uFlags)
HTWAINSESSION hSession; |
handle to an existing TWAIN session |
HBITMAPLIST hBitmap; |
handle to the list of bitmaps |
L_TCHAR * lpszTemplateFile; |
template file name |
L_UINT uFlags; |
optional flags |
Acquires one or more pages from a TWAIN source and stores the images in the specified bitmap list.
Parameter | Description | |
hSession | Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession or L_TwainInitSession2 function. | |
hBitmap | Handle to the list of bitmaps acquired from the selected TWAIN source. | |
lpszTemplateFile | Character string that contains the name of the template file in which the TWAIN source capability settings will be saved. If this parameter is NULL, the TWAIN capability settings used will not be saved to a template file. For more information on determining/setting the capabilities for a TWAIN source, refer to Getting and Settings Capabilities. | |
uFlags | Flag that determines certain actions of the TWAIN source. Possible values are: | |
Value | Meaning | |
0 | Do not show the manufacturer's user interface. | |
LTWAIN_SHOW_USER_INTERFACE | [0x0001] Shows the manufacturer's user interface as modeless. | |
LTWAIN_MODAL_USER_INTERFACE | [0x0002] Shows the manufacturer's user interface as a modal dialog. Works only if the LTWAIN_SHOW_USER_INTERFACE flag is set. | |
LTWAIN_KEEPOPEN | [0x0020] Keep the TWAIN data source open after scanning. | |
SUCCESS The function was successful.
! = SUCCESS An error occurred. Refer to Return Codes.
This function acquires one or more images from a TWAIN source and stores them in the specified bitmap list. If the user wants to acquire one or more images and process each one individually, he or she should use the L_TwainAcquire function an provide a LTWAINBITMAPCALLBACK function for processing each image.
The number of pages to acquire can be determined by getting the TWAIN source's capabilities. To change the number of pages to acquire, set the appropriate capability to the desired number.
The LTWAIN_KEEPOPEN flag works only in the following cases:
1. |
Passed with LTWAIN_SHOW_USER_INTERFACE flag to make the TWAIN user-interface appears as a modeless dialog. The TWAIN data source remains open after scanning until the user closes it. |
2. |
Passed with LTWAIN_SHOW_USER_INTERFACE and LTWAIN_MODAL_USER_INTERFACE flags to make the TWAIN user-interface appears as a modal dialog. The TWAIN data source remains open after scanning until the user closes it. |
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. |
For an example, refer to L_IsTwainAvailable.