ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Acquire black page when scanner is not connected
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jccruz

Brazil
30 Posts

Posted - Aug 14 2013 :  19:31:47  Show Profile  Reply
Hello, please give me a hand with this problem!

I have a Canon Lide 110 installed in my computer.

When I try to acquire a document and the scaner is not plugged in the USB, it opens a black page at ImageEnMView.

ImageEnMView1.MIO.TwainParams.VisibleDialog := false;
ImageEnMView1.MIO.Acquire;

If I use DeviceOnline parameter it always returns true even it is the scaner is not connected.

What can I do to know if the scaner is connected or detect if it captured a black page?

Thanks










JCC

jccruz

Brazil
30 Posts

Posted - Aug 20 2013 :  17:11:37  Show Profile  Reply
Please, any help?

JCC
Go to Top of Page

ehkhalid

27 Posts

Posted - Aug 21 2013 :  01:36:38  Show Profile  Reply
Hi,
I got the same problem 4 years ago, the prblem is that the image callback is always called even if there is an error, so i modified the imageen source code to ignore callback when an error is occured, if you have imageen source code, you need to modify the imscan file (i use vcl version), in the IETW_XferReadyMulti procedure, find the line "MultiCallBack(fBitmap, TObject(IOParams), ImDpiX, ImDpiY);", just before add this ligne "if not fAborting then"

The code before the modification is


         MultiCallBack(fBitmap, TObject(IOParams), ImDpiX, ImDpiY);
         FreeAndNil(fBitmap);


After the modification , the code will be



         if Not fAborting then
           MultiCallBack(fBitmap, TObject(IOParams), ImDpiX, ImDpiY);
         FreeAndNil(fBitmap);


Go to Top of Page

jccruz

Brazil
30 Posts

Posted - Aug 25 2013 :  16:13:02  Show Profile  Reply
Thanks ehkhalid for your help and attention.

I just have to put "grec." before fAborting.
Is it right?

if not grec.fAborting then

Jose Carlos

JCC
Go to Top of Page

ehkhalid

27 Posts

Posted - Aug 26 2013 :  00:40:14  Show Profile  Reply
Hi,
Well in my version of imageen there is a "with fgrec do" before all thoses lines, that's why i don't uses fgrec.fabort, but yes you can add it if there is no "with fgrec do" before.

Go to Top of Page

fab

1310 Posts

Posted - Sep 06 2013 :  00:49:07  Show Profile  Reply
Hi,
next version will have "if not fAborting...etc.." patch. Thank you.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: