Hi everyone,
Please help me to fix this code !!
I put ievision64.dll and ievision.dll in the same EXE folder but still the same problem!!
Note, I'm using the latest version of the IEVision plug-in
procedure TReciveDocumentF.Button5Click(Sender: TObject);
var
s: TIEVisionBarCodeSymbol;
i,z: integer;
selRect: TIEVisionRect;
n: TTreeNode;
iFilename : WideString;
begin
for z:= 0 to ImageEnMView1.ImageCount-1 do
begin
if ImageEnMView1.StoreType = ietNormal then
begin
ImageEnView1.IEBitmap.Assign(ImageEnMView1.GetTIEBitmap(z));
ImageEnMView1.ReleaseBitmap(z);
ImageEnView1.IO.Params.Assign(ImageEnMView1.MIO.Params[z]);
end
else
begin
iFilename := ImageEnMView1.ImageFileName[z];
ImageEnView1.IO.LoadFromFile(iFilename);
end;
ImageEnView1.Update;
try
//TreeViewResults.Items.Clear();
ImageEnView1.SelectionBase := iesbBitmap;
selRect := IEVisionRect(0, 0, 0, 0);
if ImageEnView1.Selected then
with ImageEnView1 do
selRect := IEVisionRect(SelX1, SelY1, SelX2 - SelX1 + 1, SelY2 - SelY1 + 1);
m_symbols := IEVisionLib.createBarCodeScanner().scan(ImageEnView1.IEBitmap.GetIEVisionImage(), selRect);
for i := 0 to m_symbols.size() - 1 do
begin
// n := TreeViewResults.Items.AddChild(nil, IntToStr(i));
s := TIEVisionBarCodeSymbol( m_symbols.getObj(i) );
// TreeViewResults.Items.AddChild(n, s.getSymbolType().c_str());
// TreeViewResults.Items.AddChild(n, s.getData().c_str());
Memo1.Lines.Add(s.getData().c_str());
// if CheckBoxShowConfidence.Checked then
// TreeViewResults.Items.AddChild(n, Format('Confidence: %d', [s.getQuality()]));
end;
// TreeViewResults.FullExpand();
// if TreeViewResults.Items.Count > 0 then
// TreeViewResults.Select(TreeViewResults.Items[0]);
except
on E: Exception do
begin
if E is EAccessViolation then
MessageDlg('An error was encountered processing this image. Ensure you are using the latest version of the IEVision plug-in.', mtError, [mbOK], 0)
else
MessageDlg('An error was encountered processing this image: ' + e.message, mtError, [mbOK], 0);
end;
end;
end;
end;