samedi 9 mai 2015

WPF: WIA for wireless printer

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 printer, 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?

Aucun commentaire:

Enregistrer un commentaire