The calling convention specifies how arguments are passed and includes other internal information used for synchronizing communication between ESL and your own libraries. When writing your dynamic link libraries, you must follow a calling convention that ESL expects.
External Subroutines
To enable the use of COBOL as a supported language, as of ESL version 14.20, all external subroutine must you the 'C' calling convention (i.e. __cdecl). When the external subroutine is written in 'C', you should use the macro "ESLSUBAPI" defined in the ESLLib.h (Header File) supplied with ESL Development Tools edition.
LONG ESLSUBAPI MakeLower(PHSTRING esl_str);
Functions
To allow for operating system APIs and third party software products, the calling convention for functions, which are always external, use the standard calling convention (i.e. __stdcall). When function is written in 'C', we recommend you use the macro "ESLFNCAPI" defined in the ESLLib.h (Header File) supplied with ESL Development Tools edition.
BOOL ESLFNCAPI HasLower(HSTRING esl_str);
Data Conversion and Stimulus
The remaining ESL calls to external routines;
For data conversion for external data storage types within an ESL structure,
Initialization of a stimulus library,
Termination of a stimulus library,
The periodic checking routine of a stimulus library, and
If coded the "EslEvent",
should use the APIENTRY macro, as it resolves to the standard calling convention (__stdcall) required by ESL for these type of entry points.