Home › Forums › TWAIN Specification › TWAIN Specification Discussion › How can I get Hardware ID or Vendor ID from TWAIN App?
- This topic has 4 replies, 2 voices, and was last updated 6 years, 10 months ago by Addison.
- AuthorPosts
Hi,
How can i extract Information about hardware ID/Container ID/Device ID/ Vender ID ?
I have written a Twain APP and I am using DSM_Entry function to open the DSM and then doing
enumuration of devices using GET_NEXT and getting the information in TW_IDENTITY parameter which is the last parameter for DSM_Entry function. But my requirement is to get hardware ID/Container ID/Device ID/ Vender ID which I am not getting.
does anybody knows what is InfoHook function in twain_32.dll and what it does?
where can I get latest twain_32.dll and twain.h file for my implementation?
Please do help me on this as I am new to TWAIN.Best Regards,
SharadTWAIN doesn’t expose hardware specific information, because there’s no common hardware system, or agreed upon way of exposing such systems (which is why TWAIN is hiding it in the first place). Over the life of TWAIN scanners have been connected using Serial Ports, Parallel Ports, SCSI, 1394, USB, Ethernet, Bluetooth and Wi-Fi. Every vendor gets to implement the bottom part of a TWAIN driver (the bit that talks to the scanner) in whatever way they want.
So, by definition, anything that’s being done to access a device directly must be doing so outside of the functionality that the TWAIN driver offers. Put another way, it’s not a vendor supported feature.
This doesn’t mean that it can’t be done, but it requires intimate knowledge of the way the scanner is supported by the operating system. For instance, if you know that the scanner is USB and is running on Windows, then it becomes possible to check to see which USBSCAN# device is currently in use by the process currently running the TWAIN driver. That information can be used to browse the registry to find related information specific to Windows and USB.
hi mark…
As you said it is possible to get some information if we knows which OS and what kind of connection it is.. In My case I am using USB scanner device on Windows Platform.. Can you plz let me know how can I get information for this ?
Study the following:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlClass{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesusbscanEnumFor Windows XP and earlier look at:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlDeviceClasses{6bdd1fc6-810f-11d0-bec7-08002be2092f}Connect and disconnect your device and note the changes occurring to keys in these areas…
AddisonThis question belong to TWAIN for C# forum. However I checked latest twaincstst project. 220-902 practice test
- AuthorPosts