Question

I wrote a simple scanning code using WIA. I don't have a scanner device so I can't test it. Can I simulate a WIA device to testing it ?

Was it helpful?

Solution

With enough effort and the WIA SDK (and probably the Windows DDK as well) you probably can. But it will be a large amount of effort, especially compared to the price tag of a cheap scanner.

I'm assuming your time is worth something. If this is a hobby project, then compare the price of a cheap scanner to the time saved that can be spent working on the fun parts of the project. If this is a work project, then the time saved is more valuable to your customer than to you, but there should still be business case for buying hardware that will save more time than it cost.

OTHER TIPS

This does definitely what you want: https://github.com/twain/wia-on-twain

I simulates a scanner and publishes a TWAIN and a WIA interface. Also the scanning of a graphical page is simulated, so you can try out different resolutions and colour schemes.

Not sure, but maybe http://scanworkssoftware.com/twainimporter.aspx will help you

or, Go to http://twain.org and under the "Fast Find" section click the last link titled "Sample Data Source & Application". This will install TWAIN 2.0 and a sample source named "TWAIN2 FreeImage Software Scanner" which has some basic scanning features. It does not have a driver interface but will let you preform scans and Get/Set some general properties.

Well, try if this virtual webcam supports the WIA interface: http://www.soundmorning.com/

If so, you are all set and ready to go.

You can also search for "Fake webcam", there are many versions.

One thing to be concerned about is that all WIA drivers are not created equally. We recently had trouble using some Brother WIA drivers that were supposedly certified. The driver would not allow access to the feeder tray. We ended up having to write TWAIN integration also.

Sounds like an occasion where writing the virtual device that is WIA compat might be the thing that needs to be given back to the community.

I know this question is very old, but I'll post this as a reference.

Since Windows 10 Microsoft has made a GitHub repository with sample drivers, including the WIA ones:

https://github.com/Microsoft/Windows-driver-samples/tree/master/wia

I wasn't able to test them yet, but they should create a test device.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top