Diagnosing and Reporting DTWAIN Problems_2
In some cases, a TWAIN device either fails to acquire the image, or some other error occurs that prevents the images from being acquired. If problems persists, the first line of defense is to try the DTWDEMO.EXE testbed application, and see if the DTWDEMO program operates correctly. If it does operate correctly, then this indicates that you're doing something incorrect in your program.
The next line of defense is to make sure that you check the return values of the DTWAIN functions that return errors, and usage of the DTWAIN_GetLastError function to see exactly what the last error was that occurred.
The next thing that can be done is to generate a TWAIN log. To do this, the DTWAIN_SetTwainLog file using the DTWAIN_LOG_ALL flag and specifying a filename to log to can be used to generate a log, or at runtime, you can turn the logging on or off using the DTWAIN32.INI settings. The logs will give much more low-level, detailed information as to what DTWAIN and your TWAIN device is doing during the acquisition process. The information contained in the log may be a little overwhelming, but it contains a wealth of information that can root out problems with either the way DTWAIN is operating, or how your TWAIN device is operating when asked to acquire an image or set of images.
If DTWAIN_LOG_ALL is used, all errors are reported, and you may get benign error messages when generating the log. You can safely ignore these message boxes.
Before reporting any problems to the DTWAIN technical support team, make sure that you have tried the DTWDEMO.EXE program to make sure your device is working properly, and that you have generated a TWAIN log. With the log file, you have a diagnostic log for the tech support team to study and give reasons and solutions to the problem.
To report errors or problems with DTWAIN, please contact support@dynarithmic.com and have available log files.
I have a bug. What is required by one of your support engineers to take a look at my DTWAIN program source?
Our support engineers can diagnose DTWAIN programs written in most popular computer languages ('C', C++, C#, Visual Basic, etc), and if necessary, other languages where we may not have experience in, but you the programmer were able to get basic DTWAIN functions to interact with the computer language you're using.
However, it is a requirement that any source code provided to Dynarithmic Software concerning a problem with DTWAIN must be a complete, but small sample program. The program should only consist of
1) calls to the DTWAIN library, plus
2) any additional lines of source code to get the sample to properly compile, link (if your language compiles source code and/or links object code), and finally execute on a "plain" Windows-based computer.
The definition of "plain" in the above line would mean that
1) the computer language's build system is installed (for example, "Microsoft Visual Studio" would be used to build and run C# programs and would need to be installed to build a C# program) and
2) the TWAIN Data Source Manager is installed, DTWAIN is installed, zero or more TWAIN devices installed, and any data files (or sample data) if the program is data driven must be available.
Code "snippets", incomplete sample functions, or incomplete programs where it cannot be determined where or what context the DTWAIN code is invoked in, what parameters (if any) were passed to the DTWAIN function(s), etc. will not be considered as viable samples of there being a fault with DTWAIN. Our engineers require small, buildable, and runnable sample programs that demonstrate the error or faulty behavior of DTWAIN.
We have placed this responsibility on the programmer using DTWAIN, since many times (if not most times), the problem is solved by the programmer in the course of putting together an example according to our requirements above. Since DTWAIN is a self-contained library, a small program can be written to duplicate any error that would be observed in a larger program.
Also, since TWAIN access happens at runtime, it is required that our support engineers can create a runnable program. This is especially the case for programs written in C or C++, where it is very easy to create faulty programs that contain buffer overruns, misuse of pointers or handling of dynamic memory, etc. that can cause DTWAIN or any other third-party library to not behave correctly.
|