cyanfish / naps2-wia

Low-level WIA 2.0/1.0 application library for .NET
MIT License
19 stars 5 forks source link

No Devices #4

Open ibrahim324 opened 2 years ago

ibrahim324 commented 2 years ago

The Example doesn't recognize my Devices. However, when using Interop.WIA.dll, i can find my device. Usually, there is at least the standard WSD Driver. Any idea how to solve this?

ibrahim324 commented 2 years ago

Interesting, when i query deviceManager.GetDeviceInfos(), i do get the correct Id's of my devices

cyanfish commented 2 years ago

Do you mean it doesn't show up in the select device window?

The issue could be that I have the prompt configured to only show scanner devices. https://github.com/cyanfish/naps2-wia/blob/c8a11474ef2e7154cdb86aeba7a80c2bd023792e/NAPS2.Wia/WiaDeviceManager.cs#L49

ibrahim324 commented 2 years ago

@cyanfish Hello Ben, thanks for your comment! Yes I meant the Prompt to select a device. My device is a Fujitsu fi-6130 Scanner, so i'm a little perplexed as to why it doesn't show up. (WIA.CommonDialog().ShowSelectDevice() out of Interop.WIA works though, as I mentioned) I was able to get my device by using WiaDeviceManager.FindDevice(), though this is not my preferred way.

cyanfish commented 2 years ago

You can try using WIA 1.0:

new WiaDeviceManager(WiaVersion.Wia10)

As for why it's not showing up in the Wia 2.0 prompt, my guess is that Fujisu misconfigured the driver so it's not considered a scanner, I'm not sure what other reason there could be.

ibrahim324 commented 2 years ago

This gives me an Exception: "NAPS2.Wia.WiaException: "WIA error code 80004002". Possibly this is due to something related to Fujitsu, but again, the native API didn't have any issues