Program Development For Various Computer Languages

Top  Previous  Next

Depending on the programming language chosen, developing an application using the DTWAIN library will vary.  Some languages require interface files so that the compiler or interpreter will understand the calls to the DTWAIN functions.

 

Here are some of the requirements to develop and run DTWAIN programs in various languages using the DTWAIN DLL.:

 

Regardless of the language used, the following DLL and resource files must be located in your program's executable directory, or a directory that is accessible through your system's PATH environment variable.

 

     dtwain32(u).dll or dtwain64(u).dll (for 64-bit applications)

     twaininfo.txt

     dtwain32.ini or dtwain64.ini (for 64-bit applications)

 

Except for C and C++ languages, there should be a file that defines the exported functions of the DTWAIN DLL when you build your application.  Here is a list of the interface files and languages.


The current list of languages that have interrface files defined are listed at the Github repository

   

 

If you're using a language where the DTWAIN DLL has to be explicitly loaded and unloaded using your language's commands/functions, it is more desirable to have the load/unload sequence done once and only once during the running of your application.  Otherwise repeatedly loading and unloading the DTWAIN DLL incurs a  runtime penalty in that the DLL has to reinitialize itself each time.

 

If using C or C++, make sure that you have the appropriate INCLUDE path set to where the DTWAIN's header files are located.



For many DTWAIN functions, a return code of TRUE or FALSE will be given. For DTWAIN, TRUE is an integer value of 1, FALSE is an integer value of 0.  If you are calling a DTWAIN function that requires TRUE or FALSE as an argument, you must state 1 or 0, respectively.  


If the computer language you are using has keywords True, False or something similar, you must make sure that these keywords result in an integral 1 for TRUE, and 0 for FALSE.