|
Version 5 |
This command allows you to import C programming language header file that describes functions exported by a DLL. If you select the DLL library under your module Libraries, then this menu will be enabled. Upon selection, Import DLL Header Prototype Dialog will be displayed for the DLL, allowing you to select the header file and import the prototype from the header file to create a similar ATEasy function calls used to call the DLL functions. The import command also generates Constants and data Types defined in the header file.
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.