AcquireMulti example for Delphi
procedure TForm1.LEADTwain1AcquireMultiEvent(nPage: Integer;
strFileName: String; bFinishScan: Boolean);
var
strBuffer: String;
begin
if ( bFinishScan ) then
begin
strBuffer:= 'The page # ' + IntToStr(nPage) + ' is scanned and saved to file name ' + strFileName;
MessageBox ( Handle, PChar(strBuffer), 'Notice', MB_OK );
end;
end;
procedure TForm1.btnAcquireMultiClick(Sender: TObject);
var
nRet: L_INT;
begin
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 ) then
MessageBox ( Handle, 'Fast Twain function was successful', 'Notice', MB_OK )
else
MessageBox ( Handle, 'Error occurred during fast Twain function!!!', 'Error!!!', MB_OK );
end;