DLL File Name

Type the DLL filename or click and browse to the DLL's location. If you plan to run your application on a PC on which the application was not developed, you should set the relative path to the location of your exe file or simply enter the file name (basename.ext) with no path. If you enter a filename with no path (directory), ATEasy searches for the file in the following directories in order:

Dll Header File

Enter C Dll Header file name that contains Dll function prototypes or click to locate the file - if it is empty, ATEasy will simply insert the Dll specified above.

Addtional Include Header files

Optionally you can enter additional header files that contain data types (struct, enum or typedef) used by DLL function prototypes.

Include Header Directories

Specify Include header directories. They are to be used to locate header files entered in above steps.

Import #include files prototypes

Check this to import prototypes in the #include files as well. By default, this is un-checked, only the prototypes of the main header file will be imported.

Use Default Include Directories

Check this to use directories specified via the menu Options\Directories.

Convert Types to ATEasy Types

Check this to convert the user defined types of DLL to ATEasy types if conversion is possible.

Create Public Symbols

By checking this, all DLL symbols including procedures, types, and constants being created will be public; that is the Public flag will be set for each symbol.  

Note that if you are inserting a DLL to a program module, the public flag is not relevant for symbols being created for DLL.  Thus this check box will be disabled.

Add Prefix Variables

If this is checked, ATEasy will add type prefix to each variable, for example, lSize where l for type Long.

Preprocessor...

This button will open "ATEasyPreprocessor.h" file (In ATEasy directory) which contains #define(s) and typedef(s) of built in types and defines.  You can further add new #define and typedefs, or modify, and/or delete existing ones.  During Importing process, ATEasy reads this header file prior to any header files. For further detailed description for this dialog, see Preprocessor Header File Dialog.

Struct Packing (version 5)

This Struct packing information is equivalent to the #pragma pack directive (in C) to control the alignment of structures. By default ATEasy uses 1 byte alignment.  If the user knows a specific structure packing the Dll uses other than 1 byte, then it must be set to the correct number of bytes alignment.

Import ATEasy DLL Procedures (version 7)

This check box indicates that the DLL is ATEasy DLL.  If the DLL is an ATEasy DLL, ATEasy will automatically import all exportable functions of ATEasy DLL along with data types being used.

Insert  

Click here to insert the DLL under the Libraries submodule of the selected module.

Cancel

Click here to cancel your entries and close the dialog box.

The Progress... dialog comes up right after you clicked OK with C header file to read Dll function prototypes:

Reading header/include files...

This static text shows the progress of reading header or include files as they are being processed. Click this to Cancel the entire process of reading header/include files.

Notes:

  1. The Import C Header File dialog is not intended to 100% precise and cannot be that way since the C data types are not defined that way for example 'Short *' parameter type (pointer to a short) can be in ATEasy 'Var Int', 'Var Int[]' or 'Val Int[]'. Microsoft came up with ActiveX/COM type libraries and .Net assemblies to avoid this and provide a precise description of data types.

  2. Make sure the header file contains legal C statements.

  3. The import will not work properly when attempting to import C++ statements (i.e. classes etc). There is no standard way of exporting C++ classes from a DLL.

  4. ATEasy provides the Ambiguous C Data Type dialog to help finding the C data type that best match ATEasy data type.

  5. You should always check the imported definitions (functions, parameters and data types) by comparing it to the header file content and correct them manually (using the Variable Properties) after Import is complete. This will help you avoid memory exceptions, stack corruption and other problems when using the DLL.