Home › Forums › TWAIN Classic › How to handle device exceptions while TWAIN based scanning
- This topic has 1 reply, 2 voices, and was last updated 9 years, 9 months ago by MarkM.
- AuthorPosts
Hi team,
I’m trying to use TWAIN for doing automated scanning for one of our applications.
Program runs successfully, however we are unable to handle the exceptions generated from device.
e.g.,
1. Paper gets jammed
2. Device gets unpluggedIn these above cases, we get a message directly from the device. However, we are unable to trap it in our application.
Could anyone provide support on how to capture/hook the messages coming from lower levels/hardware level.
Based on these messages, we need to take corrective actions or cancel the scanning operation altogether. However, we are unable to capture these exceptions or get a hook on them.
A quick and precise solution is highly appreciated.
Thanks!!!
Jagadeesha AithalThe statement of the problem is a bit ambiguous. Does “get a message directly from the device” mean that the TWAIN driver is raising a dialog box?
If so, then setting CAP_INDICATORS to FALSE and setting TW_USERINTERFACE.ShowUI to FALSE on MSG_ENABLEDS is all that the TWAIN Specification requires to suppress any dialogs from the scanner’s TWAIN driver.
If the dialogs are still appearing, then you need to talk to the scanner manufacturer about fixing their TWAIN driver.
- AuthorPosts