It is not possible to define code like the following within an ABL class...
PROCEDURE SomeCall EXTERNAL "Some.dll":
.
.
END PROCEDURE.
Prior to OpenEdge 10.2B this restriction can be worked around by putting the external procedure call into a .p then writing a wrapper program which would invoke the DLL / shared library routine and return the results.
In OpenEdge 10.2B and later you are able to call a DLL / shared library by using the CALL object. Please see the CREATE CALL statement in the documentation for further details. This code can be placed within a METHOD in the class.
class i4gl:
procedure putenv external "/lib64/libc.so.6" persistent:
define input parameter env as character.
define return parameter x as long.
end.
method public static void os-putenv( envName as character, envValue as character ):
define variable r as integer no-undo.
run putenv( substitute( “&1=&2” envName, envValue ), output r ).
end.
end class.