I'm using a slightly modified version of Twain Dot Net in my scanning application. The problem is, when the user cancels scanning using a button on the scanner (or if paper jams), TWAIN should show an error message and return with some failure code.
But instead, what happens is that the call to DG_IMAGE
/ DAT_IMAGENATIVEXFER
/ MSG_GET
returns correctly with TWRC_XFERDONE
, but the call to DG_CONTROL
/ DAT_PENDINGXFERS
/ MSG_ENDXFER
right after that never returns. What am I doing wrong?
The application is written using WPF, TWAIN's messages are sent to a message-only window running on its own thread. The scanner is Panasonic KV-S4065C.