Please enable JavaScript to view this site.

ESL Documentation

Navigation: » No topics above this level «

Q8 How do I create the Esl Function Prototype?

Scroll Prev Top Next More

In order to call a Windows Operating System function, you can use the API Viewer supplied with Microsoft Visual Studio, although if you do not access to this tool. If you have access to Microsoft Software Developers Network (MSDN) library, then you will have access to all the information you require. You may also find the API definitions you require on a technical web site. If you are working with a Third Party DLL function, then you will need the API definition, these may be supplied via a header file (file extension .H) which will typically named the same as the DLL, or they may supply a reference file which is compatible with the API Viewer. If the Third Party DLL is supplied without any API definition, then you will not be able to continue.  

Let's review the function prototype provided by ESL.

FAQs_ECI_Q8_1

or if more than a single argument

FAQs_ECI_Q8_2

and an example function prototype supplied by the API Viewer

FAQs_ECI_Q8_3

When declaring an ESL function you specify the internal ESL name, argument list, return type, name exported in DLL, and the library that contains the external function. For the argument list you can specify whether the ESL argument should be passed as the smaller C type and if it should be passed by reference. For example:

small integer       (passes a short)

float reference     (passes a pointer to a double)

As the ShellExecute function uses string arguments, we can either use the structure or integer pointer, to replace the strings. The following prototype will use the structure method, based on:

FAQs_ECI_Q8_4

The equivalent Esl Function prototype is therefore:

FAQs_ECI_Q8_5