#include "lttwn.h"

L_VOID pEXT_CALLBACK YourFunction (hSession, nPage, pszFileName, bFinishScan, pUserData)

Called twice for each scanned page. The address of this callback is passed as an argument to the L_TwainAcquireMulti function.



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

L_INT nPage

Number of the page being acquired

L_TCHAR * pszFileName

Character string containing the name of the file in which to save the scanned image(s).

L_BOOL 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.

L_VOID *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


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

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.