简体   繁体   中英

How to detect scanner, not cameras, using TWAIN

I develop app using TWAIN scanners. I need to choose only scanners, not cameras or something else. I cant't see any info about device type in command response DG_CONTROL / DAT_IDENTITY /MSG_GETFIRST.

If you want to choose scanners, it may not be the first available Source (the camera may be first), so you should instead try to show a Select Source dialog by invoking DG_CONTROL / DAT_IDENTITY / MSG_USERSELECT operation during State 3 of your TWAIN app. When you select a source and confirm, you should be able to get the Source's info and type in the TW_IDENTITY struct that you passed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM