Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Shared Library and DLL Support : Accessing a shared library entry point : Declaring a shared library for static access
 
Declaring a shared library for static access
To statically access a shared library entry point from within ABL, declare the routine using a PROCEDURE statement. The declaration is similar to an internal procedure declaration, but instead of containing procedure code, it contains options and parameter definitions that specify how to access the external shared library routine. This is the syntax for a shared library routine declaration:

Syntax

PROCEDURE proc-name EXTERNAL "dllname"
  [ CDECL | PASCAL | STDCALL ]
  [ ORDINAL n]
  [ PERSISTENT ] :
  [parameter-definition]...
END [ PROCEDURE ] .
The PROCEDURE statement that declares the DLL routine can appear anywhere within the ABL source file. It does not have to precede the RUN statement that invokes it. Typically, the procedure declarations appear at the end of the source file or are written in a separate file that is included in the source file.
The 64-bit Windows GUI and character clients ignore the CDECL, PASCAL, and STDCALL calling conventions if they are specified. The 64-bit Windows GUI and character clients always use the standard 64-bit FASTCALL calling convention.
* Options for static access to a shared library routine
* Windows DLL calling conventions for static access