Botan
1.10.9
|
#include <dyn_load.h>
Public Member Functions | |
Dynamically_Loaded_Library (const std::string &lib_name) | |
template<typename T > | |
T | resolve (const std::string &symbol) |
void * | resolve_symbol (const std::string &symbol) |
~Dynamically_Loaded_Library () | |
Represents a DLL or shared object
Definition at line 18 of file dyn_load.h.
Botan::Dynamically_Loaded_Library::Dynamically_Loaded_Library | ( | const std::string & | lib_name | ) |
Load a DLL (or fail with an exception)
lib_name | name or path to a library |
If you don't use a full path, the search order will be defined by whatever the system linker does by default. Always using fully qualified pathnames can help prevent code injection attacks (eg via manipulation of LD_LIBRARY_PATH on Linux)
Definition at line 31 of file dyn_load.cpp.
Botan::Dynamically_Loaded_Library::~Dynamically_Loaded_Library | ( | ) |
Unload the DLL
Definition at line 52 of file dyn_load.cpp.
|
inline |
Convenience function for casting symbol to the right type
symbol | names the symbol to load |
Definition at line 52 of file dyn_load.h.
References resolve_symbol().
Referenced by Botan::Dynamically_Loaded_Engine::Dynamically_Loaded_Engine().
void * Botan::Dynamically_Loaded_Library::resolve_symbol | ( | const std::string & | symbol | ) |
Load a symbol (or fail with an exception)
symbol | names the symbol to load |
Definition at line 61 of file dyn_load.cpp.
Referenced by resolve().