I have not used LeadTools, but the check for a flatbed is redundant if the device does not have a feeder. It either has a feeder, or it doesn't have a feeder.
Remember that a TWAIN device could be a digital camera, and not a scanner -- thus a "flatbed" doesn't make sense.
The current way that I check is to simply see if CAP_FEEDERENABLED
is supported is the following:
- Check if CAP_FEEDERENABLED is supported. If not supported, then there is no feeder and you're done.
- If CAP_FEEDERENABLED is supported, save the current setting of CAP_FEEDERENABLED.
- See if setting CAP_FEEDERENABLED to TRUE is successful and save the results.
- Reset CAP_FEEDERENABLED with the value saved in step 2.
- The results saved in step 3 is the determining factor.
Unfortunately, this is the roundabout way I've done this, but it should work. This is basically described in the TWAIN Specification for CAP_FEEDERENABLED (the version of the specification I use is 2.4).