Home › Forums › TWAIN Classic › Intercepting twain message provided to any application
- This topic has 1 reply, 2 voices, and was last updated 12 years, 5 months ago by peterp.
- AuthorPosts
I needs to create a module that intercepts any twain session (session of any application), in a transparent way, so when any application gets a image from a scanner, and when the image is sent, my monitor-module will automatically charge a cost$ for using the scanner.
An easy way that I see, is to activate the log, and to watch it, but I tested and it seems no work in twain v1.711
so, my question, in TWAIN v1.711 (I needs to support winXP and up), support creating log files in a different way, than the mentioned for v2.x.x in the sticky thread?.
If v1.711 don’t support .log. It support hooking for monitoring purposes?.
If v1.711 don’t support hooking for monitoring, anybody already did a hack like encapsulating the real dll and inserting an extra middle-module for do this?
All applications that talk to TWAIN scanners do so through the Data Source Manager. The Data Source Manager source code is at http://sourceforge.net/projects/twain-dsm/ .
You should be able to create your own custom DS manager that monitors all scanning activity, and passes the function calls along to the real DSM. Most operating systems come with the DSM already installed, so you’ll have to figure out how to put your DSM in it’s place while keeping a copy of it around so your fake DSM can load it and pass function calls to it.
- AuthorPosts