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.

   

Language

Interface File

Visual Basic .NET 

DTWAIN32(U)_NET.VB, DTWAIN64(U)_NET.VB

C#

DTWAIN32(U).CS, DTWAIN64(U).CS

Embarcadero Delphi

DTWAIN32(U).PAS DTWAIN64(U).PAS

Perl

DTWAIN32(U).PL

Python

DTWAIN.py

XBase++ from Alaska Software

DTWAIN32.CH (Constants only)

Macro Scheduler from MJT Net Ltd

DTWAIN32(U).SCP (Constants only)

WinBatch from Wilson Windoware

DTWAIN32.WBT (Constants only)

FoxPro

DTWFOX32.TXT

 

  For each environment, you must add the interface file to your project, unless the file only contains constants (such as XBase++).  If the file only contains constant values, then
    the file should be used only to copy/paste or to use as a reference as to what constant value(s) you must use in your DTWAIN program.

 

 

  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.