GetExtendedImageInfo example for Delphi
Function TForm1.LEADTwain1AcquirePageEvent(Bitmap: TBITMAPHANDLE): Integer;
var
i: L_INT;
nRet: L_INT;
twInfos: Array [ 0..1 ] of TW_INFO;
twInfo: TW_INFO;
pExtImg: pTW_EXTIMAGEINFO;
begin
pExtImg:= Nil;
twInfos[0].InfoID:= TWEI_BARCODECOUNT;
twInfos[0].ItemType:= TWTY_UINT32;
twInfos[1].InfoID:= TWEI_BARCODETYPE;
twInfos[1].ItemType:= TWTY_UINT32;
nRet:= LEADTwain1.CreateExtendedInfo ( @pExtImg, @twInfos, 2 );
if ( (nRet = SUCCESS) And ( pExtImg <> Nil )) then
begin
if ( LEADTwain1.GetExtendedImageInfo ( pExtImg ) = SUCCESS ) then
begin
for i:= 0 to 2 do
begin
LEADTwain1.GetExtendedInfo ( pExtImg, i, @twInfo );
// Do processing to returned values
end;
LEADTwain1.FreeExtendedImageInfoStructure ( @pExtImg );
end;
end;
Result:= nRet;
end;