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 files must be located in your program's executable directory, or a directory that is accessible through your system's PATH environment variable.

 

     DTWAIN32.DLL or DTWAIN64.DLL (for 64-bit applications)

     DTWENG.L32 or DTWENG.L64 (for 64-bit applications).  This contains the English version of the DTWAIN error messages.

 

     The *.L32/*.L64 resource DLL's are actually optional, but it is recommended that they appear since DTWAIN error messages cannot return valid

     information if the appropriate *.L32 or *.L64 file cannot be found.

 

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

   

Language

Interface File

Visual Basic (6.0 and below)

DTWAIN32.BAS, DTWAIN64.BAS

Visual Basic .NET (2005 and above)

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

C#

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

Embarcadero Delphi

DTWAIN32.PAS

Perl

DTWAIN32(U).PL

Python

DTWAIN32.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.

 

    The interface files are found in the various DTWAIN installation directory.  Please refer to the DTWAIN Help Documentation on where to find these files in the installation.

 

 

What if I don't use any of the languages defined above?
 
  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.

 

If using the C++ class wrapper to the DTWAIN Library, please consult the documentation included with the C++ classes.

 

____________________________________________________________________________

Note for Visual Basic users:  None of the Dynamic Link Libraries that come with DTWAIN are Active-X DLL's.  For example, you cannot register them with regsrvr32.exe.  The DLL's are regular Windows DLL's where all that is needed is for them to be placed in a directory that is accessible by your PATH, or in your program's executable directory.

____________________________________________________________________________

 

____________________________________________________________________________

Note for .NET application developers:  For languages that are based on the .NET framework (C#, Visual Basic .NET), some of the projects and example source code included in the DTWAIN installation may not compile with NET 1.1 framework.  Please note that this is not a problem with DTWAIN, but with the example programs not being backward compatible with older versions of the .NET framework.

 

In any event, any .NET application, regardless of version, can be created using DTWAIN by using the example programs as a guideline as to how to call the DTWAIN functions.

____________________________________________________________________________