Calling DLLs from PxPlus

PxPlus DLL Interface

 

In PxPlus, the DLL( ) function is used to load, find and execute functions within external OS-loadable modules. It provides a direct interface for both MS Windows DLL files and UNIX/Linux shared object modules. The function TCB(196) will return 1 to indicate that DLL( ) is supported for a particular UNIX/Linux environment.

The general methods for using this function involve the following formats:

 

Accessing the DLL by name:

lib_num = DLL(ADDR lib_string$ [, ERR= stmtref ] )

 

Accessing the DLL using its internal library identifier:

DLL( lib_num,fnc_name$,arg [ ,arg,arg... ][ , ERR= stmtref ] )

 

Accessing a function within the DLL by its memory address:

fnc_addr= DLL(FIND lib_num,fnc_name$ [ , ERR= stmtref ] )

Other formats for calling by string, library number, or function address are also available.

For complete syntax details, see DLL( ) function.

Note:
The [DLL] special command tag is not associated with the PxPlus DLL( ) function (DLL interface). It is used as a prefix in an OPEN statement to denote that PxPlus is to route all file I/O requests via an external (user-defined) DLL file.