![]() |
![]()
| ![]() |
![]()
NAMETcl_LoadFile, Tcl_FindSymbol - platform-independent dynamic library loading SYNOPSIS#include <tcl.h> int Tcl_LoadFile(interp, pathPtr, symbols, flags, procPtrs, loadHandlePtr) void * Tcl_FindSymbol(interp, loadHandle, symbol) ARGUMENTS
DESCRIPTIONTcl_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. REFERENCE COUNT MANAGEMENTThe reference count of the pathPtr argument to Tcl_LoadFile may be incremented. As such, it should not be given a zero reference count value. SEE ALSOTcl_FSLoadFile(3), Tcl_FSUnloadFile(3), load(n), unload(n) KEYWORDSbinary code, loading, shared library
|