Dynamic Module Loading Subsystem
◆ M_MODULE_INVALID_HANDLE
#define M_MODULE_INVALID_HANDLE NULL |
Value for an invalid module handle
◆ M_module_handle_t
◆ M_module_load()
M_module_handle_t M_module_load |
( |
const char * |
module_name, |
|
|
char * |
error, |
|
|
size_t |
error_size |
|
) |
| |
Load a module
The module should be a dynamic loadable module for the operating system. The subsystem will attempt to search for the module in multiple paths and multiple file name extensions.
There is no need to supply a suffix like .so, .dll, or .dylib.
- Parameters
-
[in] | module_name | module name to load, no suffix necessary. |
[out] | error | user-supplied error message buffer |
[in] | error_size | size of user-supplied error message buffer |
- Returns
- M_MODULE_INVALID_HANDLE on failure, otherwise a valid handle.
◆ M_module_symbol()
Retrieve a pointer to a symbol in the module
- Parameters
-
[in] | handle | Loaded module handle from M_module_load(), or M_MODULE_INVALID_HANDLE to attempt to load a symbol from the current process. |
[in] | symbol_name | Name of symbol to retrieve. |
- Returns
- Pointer to symbol on success, NULL on failure.
◆ M_module_unload()