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:
The directory where the executable file is located.
The current directory.
The Windows system directory (the directory containing such system files as GDI.EXE).
The Windows directory.
The directories listed in the PATH environment variable.
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.
Optionally you can enter additional header files that contain data types (struct, enum or typedef) used by DLL function prototypes.
Specify Include header directories. They are to be used to locate header files entered in above steps.
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.
Check this to use directories specified via the menu Options\Directories.
Check this to convert the user defined types of DLL to ATEasy types if conversion is possible.
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.
If this is checked, ATEasy will add type prefix to each variable, for example, lSize where l for type Long.
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.
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.
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.
Click here to insert the DLL under the Libraries submodule of the selected module.
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:
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:
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.
Make sure the header file contains legal C statements.
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.
ATEasy provides the Ambiguous C Data Type dialog to help finding the C data type that best match ATEasy data type.
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.