How to detect scanner, not cameras, using TWAIN

160 views Asked by At

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.

1

There are 1 answers

0
Martin On

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.