Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API
- Tcl_LoadFile, Tcl_FindSymbol — platform-independent dynamic library loading
- #include <tcl.h>
- Tcl_LoadFile(interp, pathPtr, symbols, flags, procPtrs, loadHandlePtr)
- void *
- Tcl_FindSymbol(interp, loadHandle, symbol)
- SEE ALSO
Tcl_LoadFile(interp, pathPtr, symbols, flags, procPtrs, loadHandlePtr)
Tcl_FindSymbol(interp, loadHandle, symbol)
- Tcl_Interp *interp (in)
- Interpreter to use for reporting error messages.
- Tcl_Obj *pathPtr (in)
- The name of the file to load. If it is a single name, the library search path of the current environment will be used to resolve it.
- const char *const symbols (in)
- Array of names of symbols to be resolved during the load of the library, or NULL if no symbols are to be resolved. If an array is given, the last entry in the array must be NULL.
- int flags (in)
- The value should normally be 0, but TCL_LOAD_GLOBAL or TCL_LOAD_LAZY or a combination of those two is allowed as well.
- void *procPtrs (out)
- Points to an array that will hold the addresses of the functions described in the symbols argument. Should be NULL if no symbols are to be resolved.
- Tcl_LoadHandle *loadHandlePtr (out)
- Points to a variable that will hold the handle to the abstract token describing the library that has been loaded.
- Tcl_LoadHandle loadHandle (in)
- Abstract token describing the library to look up a symbol in.
- const char *symbol (in)
- The name of the symbol to look up.
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, Tcl_FSUnloadFile, load, unload binary code, loading, shared library
Copyright © 2010 Donal K. Fellows