Declaring a shared library for dynamic access
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
To dynamically access a shared library routine from
within ABL, first create a call object with the CREATE CALL statement,
which stores the handle to the new call object in the specified
variable of type HANDLE. To create a call object,
use the following syntax:
Syntax
|
For example:
|
Compared to accessing a shared library statically with the PROCEDURE and DEFINE PARAMETER statements,
a shared library is accessed dynamically by setting several call
object handle attributes. In the following code fragment, the call
object hCall invokes the GetVersion routine
in the kernel32.dll shared library:
|
The CALL-TYPE attribute identifies that the
routine exists in a shared library. The routine expects the LONG data
type, as specified by the RETURN-VALUE-DLL-TYPE attribute.