Difference between revisions of "LOADLIBRARY()"
Yvonne.milne (Talk | contribs) |
Barrymavin (Talk | contribs) (→Description) |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
==Description== | ==Description== | ||
− | The LOADLIBRARY() function opens the specified library file, <expC>, scans the contents of it, and records the names and positions of the procedures defined within it. The file can be an API procedure library file or a JavaScript (.js), PHP (.php) or Python (.py) file. You can place as many procedures as you want in an API procedure library file. By default, library files are loaded from the Lianja extensions directory. To load a library that is not in the extensions directory, the full path must be included. | + | The LOADLIBRARY() function opens the specified library file, <expC>, scans the contents of it, and records the names and positions of the procedures, functions and classes defined within it. The file can be an API procedure library file or a JavaScript (.js), PHP (.php) or Python (.py) file. You can place as many procedures as you want in an API procedure library file. By default, library files are loaded from the Lianja extensions directory. To load a library that is not in the extensions directory, the full path must be included. |
The SET LIBRARY TO command, without any filename specified, closes all active API extension library files. A closed library file discards any knowledge of where the procedures within it reside. The RELEASE LIBRARY <library filename> command can be used to close an individual API extension library file. | The SET LIBRARY TO command, without any filename specified, closes all active API extension library files. A closed library file discards any knowledge of where the procedures within it reside. The RELEASE LIBRARY <library filename> command can be used to close an individual API extension library file. | ||
Line 36: | Line 36: | ||
[[Category:C Extensions API]] | [[Category:C Extensions API]] | ||
[[Category:Libraries]] | [[Category:Libraries]] | ||
+ | [[Category:Objects]] |
Latest revision as of 19:52, 2 March 2021
Contents
Purpose
Load an API library file
Syntax
LOADLIBRARY(<expC>)
See Also
CLOSE PROCEDURE, DISPLAY PROCEDURE, DO, FUNCTION, LIST PROCEDURE, PARAMETERS, PROCEDURE, RELEASE LIBRARY, REQUIRE(), REQUIRE_ONCE(), SET LIBRARY
Description
The LOADLIBRARY() function opens the specified library file, <expC>, scans the contents of it, and records the names and positions of the procedures, functions and classes defined within it. The file can be an API procedure library file or a JavaScript (.js), PHP (.php) or Python (.py) file. You can place as many procedures as you want in an API procedure library file. By default, library files are loaded from the Lianja extensions directory. To load a library that is not in the extensions directory, the full path must be included.
The SET LIBRARY TO command, without any filename specified, closes all active API extension library files. A closed library file discards any knowledge of where the procedures within it reside. The RELEASE LIBRARY <library filename> command can be used to close an individual API extension library file.
The LOADLIBRARY() function and the SET LIBRARY and RELEASE LIBRARY commands are not used with Lianja procedure library files: these are handled by the SET PROCEDURE and CLOSE PROCEDURE commands and the REQUIRE() and REQUIRE_ONCE() functions.
The active API procedures and functions can be listed with the LIST or DISPLAY PROCEDURE commands. Classes can be listed with the LIST or DISPLAY CLASSES commands.
Example
// Open example API extension library loadlibrary("example.dll") // Open pdf.so procedure library without closing active libraries set library to pdf.so additive // Close pdf.so API procedure library release library pdf.so // Close all active API extension libraries set library to