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
 WIA scan from flatbed with TImageEnMView fails
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Oribi

Netherlands
17 Posts

Posted - Dec 13 2020 :  11:36:38  Show Profile  Reply
A WIA scan from a flatbed using the TImageEnMView will fail when the MIO.AcquireParams.VisibleDialog is set to false.

iexAcquire.pas contains the following source:

// Allow flatbed scanning via TImageEnMIO
  if fWIAVisibleDialog and bMultiple then
    bMultiple := WIADevicePropertyHasFlag(WIA_DPS_DOCUMENT_HANDLING_SELECT, WIA_FEEDER);


Because of the fWIAVisiableDialog flag, scans from flatbed scanners fail when the VisibleDialog is not set (as in this case bMultiple may be true even though the flatbed does not support this).

After removing this flag I was able to start a scan using a flatbed without first having to select a scanner using a dialog.

A second issue I ran into was an AV in iewia.pas when setting the "Handled" flag to True in the OnAcquireBitmap event.

iewia contains the following source:
if assigned(fMultiCallBack) then
    begin
      fMultiCallBack(ProcessingBitmap, TObject(callbackParams), tmpparams.DpiX, tmpparams.DpiY);
      AssignIO(callbackParams, tmpparams);
    end;


If the handled flag in the fMultiCallBack is set to true the "callbackParams" will be NIL, which results in an AV in the AssignIO().

After modifying the code to
if assigned(fMultiCallBack) then
    begin
      fMultiCallBack(ProcessingBitmap, TObject(callbackParams), tmpparams.DpiX, tmpparams.DpiY);
      if Assigned(callbackParams) then 
        AssignIO(callbackParams, tmpparams);
    end;


I was able to scan.

xequte

38610 Posts

Posted - Dec 14 2020 :  21:53:59  Show Profile  Reply
Thank you for the reports. We'll have fixes in the next release.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: