Load(3tcl) | Tcl Library Procedures | Load(3tcl) |
Tcl_LoadFile, Tcl_FindSymbol - platform-independent dynamic library loading
#include <tcl.h> int Tcl_LoadFile(interp, pathPtr, symbols, flags, procPtrs, loadHandlePtr) void * Tcl_FindSymbol(interp, loadHandle, symbol)
Tcl_LoadFile loads a file from the filesystem (including potentially any virtual filesystem that has been installed) and provides a handle to it that may be used in further operations. The symbols array, if non-NULL, supplies a set of names of symbols (typically functions) that must be resolved from the library and which will be stored in the array indicated by procPtrs. If any of the symbols is not resolved, the loading of the file will fail with an error message left in the interpreter (if that is non-NULL). The result of Tcl_LoadFile is a standard Tcl error code. The library may be unloaded with Tcl_FSUnloadFile.
Tcl_FindSymbol locates a symbol in a loaded library and returns it. If the symbol cannot be found, it returns NULL and sets an error message in the given interp (if that is non-NULL). Note that it is unsafe to use this operation on a handle that has been passed to Tcl_FSUnloadFile.
Tcl_FSLoadFile(3tcl), Tcl_FSUnloadFile(3tcl), load(3tcl), unload(3tcl)
binary code, loading, shared library
8.6 | Tcl |