This Insert DLL dialog is very similar to the Insert Library Dialog - DLL dialog, except that (1) the DLL name is read only for it was already inserted, thus (2) it provides with an additional check box for replacing existing symbols (that were already inserted) or not. See Notes for more information.

DLL File Name

This read-only control shows a DLL name already inserted.

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. Checking this will cause functions parameters, structure field to be defined as ATEasy type instead of the original typedef. For example if a parameter is defined as INT in C language it will be converted to ATEasy equivalent data type Long.

Create Public Symbols

By checking this, the DLL procedures/types/constants being created will be public. Public DLL procedures can be accessed or called from outside the module where the DLL reside. (i.e. Program can call a driver DLL procedure).

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 to Variables

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

Replace Existing Symbols

by checking this check box, the existing symbols and procedures of the DLL will be removed. This is useful when importing a second header file to the same DLL with some function similar to the first header file, unchecking this option will cause functions that already defined in the DLL and exit in the header file to be ignored.

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.

Preprocessor

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

OK

Click here to start the process of importing DLL header file prototypes.

Cancel

Click cancel button to close the dialog box.

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.