This project has moved. For the latest updates, please go here.

Data source being enumerated in WPF sample but not in console sample

Jun 2, 2015 at 5:07 AM
When I run the WPF sample, I am presented with connected scanner devices where as when I replicate same code in WinForms or Console application or I execute your console sample it shows no scanner data source Image
Image
Image
Jun 2, 2015 at 6:16 PM
I changed the platform target to x86(through project properties) and also set active platform to x86 (through Build-> Configuration Manager) which solved the problem. But still couldn't understand what caused the problem.
Coordinator
Jun 2, 2015 at 6:16 PM
Edited Jun 2, 2015 at 6:56 PM
Hello, himanshu_kodwani.
In the first case was shown a list of a data sources, supported TWAIN 1.x. The WPF sample is a x86 TWAIN 1.x application. Apparently, all the data sources of the list are not supported in a x64 TWAIN 2.x.
The Console sample (Saraff.Twain.Sample3) is a x64 application. A TWAIN 1.x is not supported in a x64 mode, therefore a list of a data source is empty.
Also see this.
Marked as answer by SARAFF on 6/7/2015 at 12:53 PM