ADTF
3.18.2
|
System or platform specific functions for loading shared libraries. More...
Static Public Member Functions | |
static tHandle | Load (const tChar *strFilename, tUInt32 nFlags=0) |
Loads a shared library. More... | |
static tVoid | Unload (tHandle hLibrary) |
Unloads a loaded shared library. More... | |
static tVoid * | GetSymbol (tHandle hLibrary, const tChar *strSymbol) |
Returns a pointer to a function in a shared library. More... | |
static cFilename | GetLibraryFilename (const tHandle hModule) |
Returns the filename of a given library using the libraries handle. More... | |
static tResult | GetError () |
Returns the error code if something has gone wrong. More... | |
Static Private Member Functions | |
static tVoid | ClearError () |
Set the last error code to ERR_NOERROR . | |
Static Private Attributes | |
static tResult | err |
Current error code - may be retrieved using GetError() | |
System or platform specific functions for loading shared libraries.
Definition at line 18 of file dynamic_linkage.h.
|
static |
Returns the error code if something has gone wrong.
Returns the filename of a given library using the libraries handle.
Returns the filename of a library specified by a handle/pointer in the argument hModule. If hModule is nullptr
the current executable is returned. If an error occurs the path returned is empty ("").
hModule | [in] Handle to a module or a function. If nullptr (or not set), the current executable is returned. |
Returns a pointer to a function in a shared library.
if hLibrary is nullptr, GetError returns ERR_INVALID_ARG if strSymbol is nullptr, GetError returns ERR_INVALID_ARG
hLibrary | [in] The handle of the library. |
strSymbol | [in] The name of the function. |
Loads a shared library.
(win32) if the file is not found, GetError returns ERR_NOT_FOUND (win32) if the file is found but is no dll, GetError returns ERR_UNKNOWN_FORMAT (win32) if something else goes wrong, the error is set to ERR_UNEXPECTED (linux) if something goes wrong, the error is set to ERR_UNEXPECTED
strFilename | [in] The filename of the library. |
nFlags | unused. |