Problem:
- The DeviceManager has a list of installed Twain Devices. All installed Devices are listet in the Devices-List even if they are not connected.
- Example: I have installed the drivers for a Lide50 and for a DR-2050c. Now i see a lot of entries because every driver installs more than one device.
- Now i have the 2050c connected to the PC and this is the only Scanner-Device that is listed unter Windows -> Device Manager
- But the VintaSoft DeviceManager is giving me all Scanner-Devices that are possible: The Lide, some Webcams, the 2050c, ...
- If i try to open a Device that is not connected, i will get a Message that the device is not available. - Then i will run in the catch-code where i could handle that.
So: Is there any way to check for a Device being connected or not without getting any Windows-Messages/Dialogs?
My goal is: Only show devices that are really working, only devices that i could ".Open()" without error.
Edit: Oh, and i need this, because i like to Open() the Device to check if Duplex is available or not (I need this to offer this setting or to hide it from the user)
Yeah - but if the device is not connected (or switched off) there comes a Message before i can catch the error by myself.
I think that's right from the TWAIN-Interface so we cannot get around that (what means: We cannot filter out devices that are not connected - If TWAIN thinks they are there we have to live with that)
I thought there may be a way to check if a device is available or not without getting any System-Dialogs, because Windows is doing right that. If you look into the "System - Devices & Printers" you see just the connected scanner in the List of of Devices. If you switch of a scanner, it disapears from that list and comes back when you switch it on. (Think this is possible via the List of USB-Devices but i don't know how to get such Devices-List in a way that i could compare it with the List of TWAIN-Devices)
Yes, i think TWAIN is very old. Back then it was fine but then they forgot to put some modern features to it. Anyway - if i know it's not possible i can stop searching for it. That helps too :) Thank you