Home › Forums › TWAIN Classic › Twain 1.7.1.3 function is throwing unknown exception
- This topic has 2 replies, 3 voices, and was last updated 7 years, 7 months ago by pmanickavel.
- AuthorPosts
Hello
Twain 1.7.1.3 function is throwing an unknown exception. Is it possible to log the exception? Is it possible to use kLog in twain_32.dll as in TWAINDSM.dll?
Thanks
Pradeep Kumar ManickavelThe TWAIN_32.DLL is effectively “dead code” insofar as it’s not possible to make changes to it, and it’s closed code not open source. It was last modified around the early 2000’s. Using the newer TWAINDSM.DLL is a better solution.
There is a logging mechanism for TWAIN_32.DLL, but it’s very limited, and if a crash is occurring it’s unlikely that it will be able to write the information you want to disk.
Your best bet is to go through each of the steps the application is doing using the TWACKER (you can collect the commands using the TWAINDSM.DLL logging), and when you find the one that’s causing the crash contact the scanner manufacturer or the application writer for more help.
Thanks Mark!
Now I have decided to upgrade to TWAINDSM. And I am planning to refer the library statically into my C++/CLI wrapper code rather than invoking the dll using DLLIMPORT. I face some issues as the entry method shall be invoked once after LoadLibrary is called. In my wrapper code case, I am going to refer it as a static lib and hence I don’t require LoadLibrary. Now I am not able to create reference to the DSMENTRYPROC. Please guide me how to proceed with C++/CLI wrapper code for TWAINDSM.Please note that this wrapper dll will be consumed in C# code. I know that even in C# we can invoke TWAINDSM through DLLIMPORT, but here is the condition that I should refer it statically.
Any suggestions and comments are appreciable.
Thanks
Pradeep Kumar- AuthorPosts