#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mbs_load_libraries.h"
#include "mbs_message.h"
#include "mbs_errors_names.h"
#include "mbs_project_interface.h"
Functions | |
void | mbs_close_dynamic_library (MbsDataLibInfo *li) |
Close the library pointed by MbsDataLibInfo and free the memory associated to the given MbsDataLibInfo. More... | |
MbsDataLibInfo * | mbs_load_dynamic_library (char *libpath) |
Load the library in a MbsDataLibInfo. More... | |
FARPROC WINAPI | mbs_load_function (MbsDataLibInfo *li, char *fct_name) |
mbs_load_function: dynamic loading of a function from a given library. More... | |
FARPROC WINAPI | mbs_try_load_function (MbsDataLibInfo *li, char *fct_name) |
mbs_load_function: dynamic loading of a function from a given library. More... | |
int | mbs_load_symbolic_functions (MbsData *mbs_data, const char *symbolicLib_path, const char *symbolicLib_name) |
Loads the symbolic functions from library into MbsData structure. More... | |
int | mbs_load_user_functions (MbsData *mbs_data, const char *userfctLib_path, const char *userfctLib_name) |
specific functions More... | |
void | mbs_close_libraries (MbsData *mbs_data) |
Close the symbolic and userfct libraries associated to the given MbsData. More... | |
void mbs_close_dynamic_library | ( | MbsDataLibInfo * | li | ) |
Close the library pointed by MbsDataLibInfo and free the memory associated to the given MbsDataLibInfo.
li | the structure to be freed. |
void mbs_close_libraries | ( | MbsData * | mbs_data | ) |
Close the symbolic and userfct libraries associated to the given MbsData.
mbs_data | the project structure to be cleared from libraries. |
MbsDataLibInfo* mbs_load_dynamic_library | ( | char * | libpath | ) |
Load the library in a MbsDataLibInfo.
Utility functions.
libpath | library path. |
FARPROC WINAPI mbs_load_function | ( | MbsDataLibInfo * | li, |
char * | fct_name | ||
) |
mbs_load_function: dynamic loading of a function from a given library.
Produce an error message if the function does not exist
li | the libray where to load the function |
fct_name | the name of the function to load |
int mbs_load_symbolic_functions | ( | MbsData * | mbs_data, |
const char * | symbolic_path, | ||
const char * | symbolicLib_name | ||
) |
Loads the symbolic functions from library into MbsData structure.
mbs_data | the project structure to be filled. |
symbolic_path | the directory of the library. |
symbolicLib_name | the name of the library to load. |
int mbs_load_user_functions | ( | MbsData * | mbs_data, |
const char * | user_path, | ||
const char * | userfctLib_name | ||
) |
specific functions
Loads the user functions from library into MbsData structure.
mbs_data | the project structure to be filled. |
user_path | the directory of the library. |
userfctLib_name | the name of the library to load. |
FARPROC WINAPI mbs_try_load_function | ( | MbsDataLibInfo * | li, |
char * | fct_name | ||
) |
mbs_load_function: dynamic loading of a function from a given library.
Return NULL if the function does not exist
li | the libray where to load the function |
fct_name | the name of the function to load |