GATE
|
Controls access to shared libraries (DLL or SO) More...
#include "gate/gate_core_api.h"
#include "gate/gatetypes.h"
#include "gate/strings.h"
#include "gate/objects.h"
Functions | |
GATE_CORE_API gate_result_t | gate_library_open (gate_string_t const *path, gate_library_t *lib, gate_uint32_t flags) |
Opens a shared library (DLL or SO) and generates a library handle. | |
GATE_CORE_API gate_result_t | gate_library_close (gate_library_t lib) |
GATE_CORE_API gate_result_t | gate_library_get_function (gate_library_t lib, gate_string_t const *entryname, gate_library_function_t *ptr_func) |
Loads a function by its name and returns a pointer to it. | |
GATE_CORE_API gate_result_t | gate_library_get_data (gate_library_t lib, gate_string_t const *entryname, void **ptr_data) |
Loads a data value by its name and returns a pointer to it. | |
GATE_CORE_API gate_result_t | gate_library_get_function_name (gate_library_t lib, char const *funcname, void *ptr_func) |
Loads a function by its c-string name and returns a pointer to it. | |
GATE_CORE_API gate_result_t | gate_library_get_data_name (gate_library_t lib, char const *entryname, void *ptr_data) |
Loads a data value by its c-string name and returns a pointer to it. | |
Controls access to shared libraries (DLL or SO)
GATE_CORE_API gate_result_t gate_library_open | ( | gate_string_t const * | path, |
gate_library_t * | lib, | ||
gate_uint32_t | flags ) |
Opens a shared library (DLL or SO) and generates a library handle.
path | File path of library to be opened |
lib | pointer to library handle that receives the result |
flags | Opening flag to change library behavior |
GATE_CORE_API gate_result_t gate_library_close | ( | gate_library_t | lib | ) |
Closes an opened library handle
lib | Library handle |
GATE_CORE_API gate_result_t gate_library_get_function | ( | gate_library_t | lib, |
gate_string_t const * | entryname, | ||
gate_library_function_t * | ptr_func ) |
Loads a function by its name and returns a pointer to it.
lib | Library handle |
entryname | Name of function to be loaded |
ptr_func | Pointer to a location where the function pointer is written to |
GATE_CORE_API gate_result_t gate_library_get_data | ( | gate_library_t | lib, |
gate_string_t const * | entryname, | ||
void ** | ptr_data ) |
Loads a data value by its name and returns a pointer to it.
lib | Library handle |
entryname | Name of data value to be loaded |
ptr_data | Pointer to a location where the data pointer is written to |
GATE_CORE_API gate_result_t gate_library_get_function_name | ( | gate_library_t | lib, |
char const * | funcname, | ||
void * | ptr_func ) |
Loads a function by its c-string name and returns a pointer to it.
lib | Library handle |
funcname | Name of function to be loaded |
ptr_func | Pointer to a location where the function pointer is written to |
GATE_CORE_API gate_result_t gate_library_get_data_name | ( | gate_library_t | lib, |
char const * | entryname, | ||
void * | ptr_data ) |
Loads a data value by its c-string name and returns a pointer to it.
lib | Library handle |
entryname | Name of data value to be loaded |
ptr_data | Pointer to a location where the data pointer is written to |