Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends i am using TWAINDotNet(version 1.0.0.0 ) dll for scan document it scan documents perfectly but problem is twain acquire the devices eg. scanner which is offline(this devices physically not present only setup installed.)

so i want to display the only connected devices which is online(physically connected not an installed setup devices.).

What I have tried:

 Private _twain As Twain

_twain = New Twain(New WpfWindowMessageHook(Me))

sourceList = _twain.SourceNames

CmbScannerNameList.ItemsSource = sourceList


using this code _twain bind this sources names to combo-box.which is online as well as offline devices(setup installed devices). i want to detect the online(which is physically present) ?


please help

thanks in advance . :)
Posted
Updated 13-Feb-18 19:26pm
v4
Comments
Ralf Meier 14-Feb-18 1:32am    
Mostly those information is stored in the Registry from Windows. But I can't give you a Key-Name - but maybe this information helps you anyway to find a possible way ...
ketan Ram Patil 14-Feb-18 1:44am    
thank you for your valuable replay.. :)

yes i seen in the regedit " HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{6bdd1fc6-810f-11d0-bec7-08002be2092f} "

after class it shows so many devices list but this devices not connected to computer.

don't know what to do now :(
Ralf Meier 14-Feb-18 2:18am    
I only can give you this inspiration - sorry - not the solution, because I'm not sitting at your place ...
Basicly you must find much more Entries corresponding to your Twain-Driver OR your device. Perhaps you look also for the VID and the PID of your device.
A possible Path could be : HKey_Local_Machine\System\ControlSet001\ENum\ ... and after this point look for your VID and the PID of your Device or it's Driver. Somewhere you should have the Device-Parameter and one of this parameters possible is different if the Device is attached or not ...
Michael_Davies 14-Mar-18 4:11am    
Have you tried using Windows Image Acquisition library, one of the properties may indicate state.

Severla sites, try this https://social.microsoft.com/Forums/en-US/4b350704-d9b3-4920-a68a-802f5f4e8a6a/how-to-retrieve-installed-scanner-win32scanner?forum=netfxbcl

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900