Arbortext Command Language > Functions by Alphabetical Listing > dl_load
  
dl_load
dl_load(file[, world[, type]])
This function loads the dynamic (or shared) library specified by the path name file. dl_load returns an identifier which can be used in subsequent calls to dl_find and dl_unload. It returns 0 if the library could not be loaded. The function dl_error can be used on some systems to retrieve a message describing the nature of the error.
The library identifier returned by dl_load can be passed to the function dl_find to get the address of a function in the dynamic library to be called using dl_call.
The optional parameter world is ignored except on Solaris systems where it allows the shared library to reference symbols that are part of Arbortext Editor (if set to one (1). If omitted, it defaults to zero (0).
The optional parameter type specifies whether the dynamic library expects 16-bit Unicode strings or 8-bit strings in parameters and return values. A type of one (1) specifies Unicode strings; zero (0) specifies 8-bit strings. If omitted, it defaults to zero (0).
dl_load is an interface to the Windows API LoadLibrary and follows the same rules if file does not specify a path name. Because Arbortext Editor is a Win32 executable, the DLL loaded by dl_load must also be a 32-bit library. As with standard Windows APIs, functions exported by the DLL must be declared with the "standard" calling convention, that is, using the keyword __stdcall.
See dl_find and dl_call for examples.
Related Topics
dl_call built-in function
dl_error built-in function
dl_find built-in function
dl_unload built-in function