I need to acquire images from a scanner in my WPF application. I've used the open source TwainDotNet Twain32 wrapper, however, there are some Windows 8.1 devices that throw an AccessViolationException. I would like to use the latest Microsoft supported WIA wrappers in the Windows.Devices.Scanners namespace rather than buy a product to enable scanning on Windows 8.1+ machines.
I've successfully been able to use some of the Windows.Devices.* types for video recording in a WPF app via the following instructions: How to use specific WinRT API from Desktop apps: capturing a photo using your webcam into a WPF app
When you look at the documentation for Windows.Devices.Scanners ImageScanner class, You can see that the minimum supported client is Windows 8.1 [Windows Store apps, desktop apps]. Since it is available to both Windows Store Apps and Desktop apps, this means that you should be able to use this namespace and the associated classes from within WPF. The metadata is listed as Windows.winmd which I believe is already referenced in the project (A reference to Windows) as outlined in the tutorial above.
My question: How can I use the Windows.Devices.Scanners types in a WPF application running on Windows 8.x+ ?
Thanks in advance to all replies