I am running Windows 10 and using an Epson XP-850 MFP. I get the following error message when I select "Use Document Feeder (ADF)" in iCopy.
Microsoft.Net Framework
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Value does not fall within the expected range
Here is the text when I select Details for the error:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
** Exception Text **
System.ArgumentException: Value does not fall within the expected range.
at WIA.CommonDialogClass.ShowTransfer(Item Item, String FormatID, Boolean CancelError)
at iCopy.Scanner.ScanADFNormal(ScanSettings settings)
at iCopy.Scanner.ScanADF(ScanSettings options)
at iCopy.appControl.Copy(ScanSettings options)
at iCopy.mainFrm.btnCopy_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Dear Anthony,
this is a long-standing problem with some WIA scanners, one that is difficult to debug.
Please try with the attached version to see if the problem is solved. Please also attach the log file as instructed in the FAQ section of the website:
http://icopy.sourceforge.net/faq/
In case the above doesn't work, please try with this one (Git Commit 6c660582). Thank you very much!
Dear Matteo, thank you for this it's working fine now. I am attaching the log file but there's not much in it.
Dear Anthony,
thank you for answering! With which attached version is the problem fixed? The first or the second? Could you please try also the other one and tell me if it works? I need as much information as possible on the problem to solve it once and for all.
Thanks
Matteo
Dear Matteo,
You are very welcome. I tried the second one (Git Commit 6c660582). I will try the first one as well and let you know what happens.
Regards,
Anthony
Dear Matteo,
I have tried both versions and they both work with the ADF function. However if I enable duplex aquisition I get the Unhandled exception error again.
Regards,
Anthony
Thank you for replying. So with duplex neither of the versions works? Which error do you get with the second version (Git Commit 6c660582)?
Yes it does not work with either.
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Value does not fall within the expected range
Details:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
** Exception Text **
System.ArgumentException: Value does not fall within the expected range.
at WIA.ItemClass.Transfer(String FormatID)
at iCopy.Scanner.ScanNormal(ScanSettings settings)
at iCopy.Scanner.Scan(ScanSettings options)
at iCopy.appControl.Copy(ScanSettings options)
at iCopy.mainFrm.btnCopy_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Last edit: Matteo Rossi 2016-06-01
Dear Anthony, while I was trying to fix the duplex problem, I ran into this article of Microsoft knowledge base, which basically states that duplex is not supported in WIA Automation Layer (the API that I'm using). This means that, unless a particular workaround can be found for your MFP, I wont be able to find a general solution.
Last edit: Matteo Rossi 2016-06-01