DTWAIN Program Development

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 must 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

DTWAIN32.BAS

Visual Basic .NET

DTWAIN32_NET.BAS, DTWAIN64_NET.BAS

C#

DTWAIN32.CS, DTWAIN64.CS

Delphi

DTWAIN32.PAS

FoxPro

DTWFOX32.TXT

 

  For each environment, you must add the interface file to your project. 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 (C/C++, Visual Basic, FoxPro, C#, or Delphi)?

 

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.

____________________________________________________________________________