Scanning from the ADF using WIA in C#

Updated on Wednesday, June 2, 2021

Comments Page 2

Return to post.

Comments

Rob Ellison

Sorry - need to fix these nested comments, getting a bit narrow down here.

'3' is FEED and FLAT, so no auto-detection capability. You can get the constant values from WiaDef.h (in the Platform SDK).

I'm out of ideas for now. I'll post back if I think of anything else. Please let me know if you figure this out so I can update the sample code if necessary.

Stephen

It comes back as 3. I'm not certain which constant that is. I am on Win 7 64bit.

Rob Ellison

What is reported for the WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES property (see comments above with MSDN link)?

Stephen

Brother MFC-7340. I uninstalled and reinstsalled the device, double checked that the drivers were accurately installed and I get the same results.

Rob Ellison

What is the device that you're trying to work with? Have you tried checking to see if you have the latest drivers installed?

Stephen

I took out the check for status and it throws a value out of expected range exception when it calls ShowTransfer. If I don't try to set the prop, it automatically goes to the flatbed. This is driving me insane.

Stephen

It throws an exception that the value is not in range when the ShowTransfer method is called. If I comment out trying to change the prop, it automatically selects the flatbed.

Rob Ellison

No exception? It just hangs?

I know that some devices can detect if a document is in the ADF in which case you might not need to set the ADF option before scanning. If you comment this out does it get any further?

Stephen

This code doesn't work for me. It stalls after checking the handling status. It acts like it is not setting the device handling to the feeder. Is there an issue with specific devices not being able to be set from WIA?

Aurelio

Thanks a lot Rob!

Add Comment

All comments are moderated. Your email address is used to display a Gravatar and optionally for notification of new comments and to sign up for the newsletter.