Using ATEasy DLL from C or VB Language
 

After you created an ATEasy DLL, you can export its exportable functions and data types used to C header file or VB (Visual Basic) .Net header file.  

Under ATEasy File menu, two export menu commands are available for this purpose:

When you select one of commands, File Save As dialog is displayed with default header file name which is the same name as ATEasy DLL target name (and location specified in the project property page).  The dialog allows you to change its name and location if desired and a header file will be written out.

The Files generated contains the exported function prototypes. In addition to these function two internal function are also  exported: __Initialize() and __Cleanup(). These functions are normally called by the ATEasy run-time and you do not need to use them normally.  The __Initialize() is called to force loading the libraries referenced by the ATEasy DLL when the DLL is loaded. Normally these libraries are loaded on first call to the one of exported functions. The __Cleanup() is used to free libraries and other resources used by the ATEasy DLL before the library get unloaded, normally the function is called when the library is unloaded.

ATEasy will convert the ATEasy parameters types, automatically mapped to C or VB types:

 

ATEasy Data Types

C/C++ Data Type

Visual Basic .Net Data Type

Char

char

SByte

Byte

unsigned char

Byte

Short

short

Short

Bool

short (VARIANT_BOOL - Microsoft)

Boolean

Word

unsigned short (WORD - Microsoft)

UShort

WChar

unsigned short (WCHAR - Microsoft)

Char

Long

long

Integer

DLong 

longlong

Long

DWord

unsigned long

UInteger

DDWord

unsigned longlong

ULong

Float

float

Single

Double

double

Double

Currency

CY (Microsoft - wtypes.h)

Long

DateTime

double (DATE - Microsoft - wtypes.h)

Date

String

LPSTR

String

BString

LPCWSTR

String

Variant

VARIANT

Object

Procedure

void *

"Declare sub/function" statement

Object

LPUNKNOWN

Object

Any

LPVOID

Integer

You can now include the header file of ATEasy DLL to your respective development environment and import the ATEasy DLL functions.