LEADTOOLS TWAIN C DLL Help > Function References > Callback Functions > LTWAINACQUIRECALLBACK |
#include "lttwn.h"
L_VOID pEXT_CALLBACK YourFunction (hSession, nPage, pszFileName, bFinishScan, pUserData)
HTWAINSESSION hSession; |
/* handle to an existing TWAIN session */ |
L_INT nPage; |
/* page number */ |
L_TCHAR * pszFileName; |
/* File name */ |
L_BOOL bFinishScan; |
/* flag to determine if the scanning status */ |
L_VOID *pUserData; |
/* pointer to additional parameters */ |
Called twice for each scanned page. The address of this callback is passed as an argument to the L_TwainAcquireMulti function.
Parameter |
Description |
|
hSession |
Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession function. |
|
nPage |
Number of the page being acquired |
|
pszFileName |
Character string containing the name of the file in which to save the scanned image(s). |
|
bFinishScan |
Flag that indicates the scanning status. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
Scanning of the page has finished. |
|
FALSE |
Scanning of the page has just started. |
pUserData |
A void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of L_TwainAcquireMulti.) |
|
|
Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function |
Comments
This callback will be called two times. The callback is called the first time when the Twain source begins scanning the page. The callback is called the second time when the Twain source has finished scanning the page.
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. |
See Also
Example
For an example, refer to L_TwainAcquireMulti.