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
 Bug in ImageAcquisition\WIAScanner?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

JonRobertson

USA
41 Posts

Posted - Oct 27 2011 :  14:24:27  Show Profile  Reply
I'm considering adding support for WIA to our application. I am using the demo at ImageAcquitision\WIAScanner to test against one of the most common scanners used by our customers, a DocketPort 687. This is a duplex A6 scanner, used by our customers to scan drivers licenses and insurance cards.

The Scanner Info tab for this scanner was not making sense. Capabilities were not present that I expected. After looking closer at the code and help file, I'm fairly sure there is a bug on line 326:

    temp := GetDeviceProperty(WIA_DPS_SHEET_FEEDER_REGISTRATION);
//!!!  Shouldn't this be WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES ???
    CheckBox3.Checked := (temp and WIA_FEED) <> 0; // readonly
    CheckBox4.Checked := (temp and WIA_FLAT) <> 0; // readonly
    CheckBox5.Checked := (temp and WIA_DUP) <> 0; // readonly
    CheckBox6.Checked := (temp and WIA_DETECT_FLAT) <> 0; // readonly
    CheckBox7.Checked := (temp and WIA_DETECT_SCAN) <> 0; // readonly
    CheckBox8.Checked := (temp and WIA_DETECT_FEED) <> 0; // readonly
    CheckBox9.Checked := (temp and WIA_DETECT_DUP) <> 0; // readonly
    CheckBox10.Checked := (temp and WIA_DETECT_FEED_AVAIL) <> 0; // readonly
    CheckBox11.Checked := (temp and WIA_DETECT_DUP_AVAIL) <> 0; // readonly
    Edit35.Text := GetDeviceProperty(WIA_DPS_DOCUMENT_HANDLING_CAPACITY); // readonly

JonRobertson

USA
41 Posts

Posted - Oct 27 2011 :  15:42:40  Show Profile  Reply
Note I also found a bug in Multi\Multiview. If the user cancels the WIA acquire dialog, an Access Violation occurs. After cancelling the dialog, Acquire is still called, which shouldn't be since I wanted to cancel the scan request. I changed the code in Acquirepages1Click to only call Acquire if ShowAcquireDialog returns True:

  if ImageEnMView1.MIO.WIAParams.ShowAcquireDialog(false) then // show the scanner dialog (Remove if you don't want it)
    ImageEnMView1.MIO.Acquire(ieaWIA);


Go to Top of Page

xequte

39142 Posts

Posted - Oct 28 2011 :  11:49:07  Show Profile  Reply
Hi Jon

Thanks for reporting these two issues. We will investigate further.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

fab

1310 Posts

Posted - Oct 29 2011 :  04:40:03  Show Profile  Reply
Yes, in WIAScanner WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES must replace WIA_DPS_SHEET_FEEDER_REGISTRATION and in Multiview then Acquire must be checked.

Thank you helping us to make demos better.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: