Examples of dynamic access to a shared library
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The following examples show several variations on the use of the call object handle attributes for dynamic access to a shared library.
This example demonstrates the use of the RETURN-VALUE-DLL-TYPE attribute
and the RETURN-VALUE attribute when invoking a
Windows DLL routine. RETURN-VALUE-DLL-TYPE is set
to "LONG", which is the value that the DLL routine
expects to receive, as shown:
|
After the invoke finishes executing, iValue contains an INTEGER value.
The following example implements an ABL function, sleep,
which causes the AVM to sleep for a specified number of milliseconds.
The code checks to determine which OS is running, and invokes the
appropriate Windows DLL or UNIX shared library.
|