Home › Forums › TWAIN Classic › Twain Web Control Issue
- This topic has 0 replies, 1 voice, and was last updated 14 years, 7 months ago by mcohen.
- AuthorPosts
Hi all.
I am building a Twain Control that is deployed over the Internet to client applications. This Control is built as a “Class Library” which generates an “MDI Form” upon activation. Clients use JavaScript to call my public method “Scan” exposed by the “Class Library”. This method creates an instance of the MDI form and loads it into memory. When the MDI form loads, it initializes a Twain object using its own windows handle or pointer to the Triplet Operation TW_DG.DG_CONTROL, TW_DAT.DAT_PARENT, TW_MSG.MSG_OPENDSM which in turn returns a SUCCESS code. Twain then loads the “Source Manager” successfully where I am able to select a “Twain Source”. After selecting a source I get the expected “Twain User Interface” which is able to “PreScan” without a problem. However, all other options are unresponsive, including the “Scan Button” (Actually, if there is no paper on the scanner, the “Scan Button” does respond with a “No Paper” error message, but if there is paper it becomes unresponsive). You should note several things I’ve attempted or checked:
1.- When running the Triplet Operation TW_DG.DG_CONTROL, TW_DAT.DAT_USERINTERFACE, TW_MSG.MSG_ENABLEDS, the response code is TW_RC.TWRC_SUCCESS, so I assume there is no problem on that end.
2.- I have a function “PreFilterMessage” that is constantly querying the Twain object for any Events that maybe generated. This function doesn’t seem to be getting any messages at all from the Twain object.
3.- The same code works without glitch if I deploy the application to the client as an executable where the MDI form is the startup object.The problem seems to be related to event handling of some sort. Somehow the windows handle or pointer gets lost or is the wrong one, but I can’t figure out why or how to fix it…
Any help would be greatly appreciated.
- AuthorPosts