TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

How can I get Hardware ID or Vendor ID from TWAIN App?

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 3 years, 9 months ago by Addison.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 22, 2014 at 3:35 pm #22911 Reply
    Sharad
    Participant
    • Topics - 9
    • Replies - 3
    • Total Posts - 12

    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,
    Sharad

    January 30, 2014 at 5:08 pm #26062 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    TWAIN 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.

    February 13, 2014 at 5:40 am #26063 Reply
    Sharad
    Participant
    • Topics - 9
    • Replies - 3
    • Total Posts - 12

    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 ?

    February 13, 2014 at 6:28 pm #26064 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    Study the following:
    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlClass{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}
    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesusbscanEnum

    For 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…

    July 8, 2017 at 4:56 am #30281 Reply
    Addison
    • Topics - 101
    • Replies - 195
    • Total Posts - 296

    This question belong to TWAIN for C# forum. However I checked latest twaincstst project. 220-902 practice test

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: How can I get Hardware ID or Vendor ID from TWAIN App?
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • PDF/R For who and where?
  • Making searchable PDF with PDF/R
  • Backward compatibility with PDF/A and traditional PDF
  • could not open the twain source. Make sure there is a valid source for your sca
  • Changing TWAIN driver defaults
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.