AcquireMulti example for C++ Builder
void __fastcall TForm1::LEADTwain1AcquireMultiEvent(int nPage,
AnsiString strFileName, bool bFinishScan)
{
AnsiString strBuffer;
if ( bFinishScan )
{
strBuffer= "The page # " + IntToStr(nPage) + " is scanned and saved to file name " + strFileName;
MessageBox ( Handle, strBuffer.c_str( ), "Notice", MB_OK );
}
}
void __fastcall TForm1::btnAcquireMultiClick(TObject *Sender)
{
L_INT nRet;
LEADTwain1->EnableAcquireMultiEvent = True;
nRet= LEADTwain1->AcquireMulti ( "c:\\TWAIN\\test.tif",
LTWAIN_SHOW_USER_INTERFACE,
LTWAIN_BUFFER_MODE,
FILE_TIF,
1,
TRUE,
0,
True );
if ( nRet == SUCCESS )
MessageBox ( Handle, "Fast Twain function was successful", "Notice", MB_OK );
else
MessageBox ( Handle, "Error occurred during fast Twain function!!!", "Error!!!", MB_OK );
}