Forums › TWAIN Classic › Cancel button NOT responding while Scanning is in Progress
- This topic has 0 replies, 1 voice, and was last updated 2 years ago by Kishore.
-
AuthorPosts
-
Kishore
- Topics - 101
- Replies - 195
- Total Posts - 296
Hello,
I am working on an experimental TWAIN App for Windows platform.
For the most part things are working good for me, except that I cannot cancel scan while the scan is in Progress.
As per TWAIN standard, I think I am doing my best with Windows Message looping and passing Windows Msg to TWAIN with DG_CONTROL/DAT_EVENT/MSG_PROCESSEVENT from Event queue. But despite that I think I have missed some parts (I’m not sure where things went wrong). I’m facing this problem that when the scan is in progress, I cannot interact with the “scan progress” dialog box, which also means cannot “cancel the scan”.
While debugging my application, I’m seeing that after I make DG_IMAGE/DAT_IMAGENATIVEXFER/MSG_GET call to DSM_Entry, the DSM_Entry function is not returning until the scan is complete. And basically this is causing the problem. This DSM_Entry is getting called inside the UI Messaging loop, responsible for getting all the Users actions on App Window. Now, if message DG_IMAGE/DAT_IMAGENATIVEXFER/MSG_GET is making DSM_Entry blocked, then how I’m I supposed to get user actions? Who is supposed to listen to UI action while scan is in progress. As per specification, we are supposed to use single thread to make it work, which also further confuses me.
Can someone help me understand where am I going wrong?
-
AuthorPosts