0
votes

I am having an application, that will scan documents, and I am using Windows Image Acquisition. I applied what's instructed in this article written by Pete Brown, it's quite interesting but in my case, I have a wireless scanner, my code throws an exception that it doesn't find a device. I tries to enumerate the devices using this code I found:

public static List<string> GetDevices()
{
    List<string> devices = new List<string>();
    WIA.DeviceManager manager = new WIA.DeviceManager();

    foreach (WIA.DeviceInfo info in manager.DeviceInfos)
    {
         devices.Add(info.DeviceID);
    }

    return devices;
}

but the returned list is empty.

So is there any solution to this problem?

1
Did you mean wireless scanner? WIA does not deal with printers...Grx70
Yes a scanner, I'll change it right now ( I have a 3 in one printer)Ayoub.A
Does your scanner show up when you use select dialog - new WIA.CommonDialog().ShowSelectDevice()? Perhaps your device does not have WIA-compatible drivers...Grx70
I don't think that is the problem, since, as I mentioned, it works when I connect my scanner directly.Ayoub.A

1 Answers

0
votes

When I use

WIA.DeviceManager manager = new WIA.DeviceManagerClass();

instead of

WIA.DeviceManager manager = new WIA.DeviceManager();

the manager.DeviceInfos includes my network Scanner.