This header provides functions to load and unload dynamic-link libaries, to get the address of a symbol, and to get diagnostic information. More...
Functions | |
EVIL_API void * | dlopen (const char *path, int mode) |
Map a specified executable module (either a .dll or .exe file) into the address space of the user process. More... | |
EVIL_API int | dlclose (void *handle) |
Close a dynamic-link library. More... | |
EVIL_API void * | dlsym (void *handle, const char *symbol) |
Get the address of a symbol. More... | |
EVIL_API char * | dlerror (void) |
Get diagnostic information. More... | |
This header provides functions to load and unload dynamic-link libaries, to get the address of a symbol, and to get diagnostic information.
EVIL_API void * dlopen | ( | const char * | path, |
int | mode | ||
) |
Map a specified executable module (either a .dll or .exe file) into the address space of the user process.
path | Name of the module. |
mode | Unused. |
NULL
on failure.Map a specified executable module (either a .dll or .exe file) into the address space of the user process. If path
is NULL
, then the module corresponding to the current process is returned. Otherwise the module specified by path
is loaded if it exists. If not, NULL
is returned. The directory separators can be forward slash, or backward ones. Mapping a module can map other modules. mode
is unused.
If an error occurred, an error string can be retrived with dlerror().
According to the OS, the search order of the module can change, according to the value of SafeDllSearchMode.
If SafeDllSearchMode is enabled
If SafeDllSearchMode is disabled
Conformity: None.
Supported OS: Windows Vista, Windows XP or Windows 2000 Professional.
References evil_char_to_wchar().
Referenced by efl_quicklaunch_prepare(), eina_module_load(), and elm_quicklaunch_prepare().
EVIL_API int dlclose | ( | void * | handle | ) |
Close a dynamic-link library.
handle | Handle that references a dynamic-link library. |
Release a reference to the dynamic-link library referenced by handle
. If the reference count drops to 0, the handle is removed from the address space and is rendered invalid. handle
is the value returned by a previous call to dlopen().
If no error occurred, the returned value is 0, otherwise the returned value is -1 and an error string can be retrived with dlerror().
Conformity: None.
Supported OS: Windows Vista, Windows XP or Windows 2000 Professional.
Referenced by efl_quicklaunch_prepare(), eina_module_load(), eina_module_unload(), elm_quicklaunch_cleanup(), and elm_quicklaunch_prepare().
EVIL_API void * dlsym | ( | void * | handle, |
const char * | symbol | ||
) |
Get the address of a symbol.
handle | Handle that references a dynamic-link library. |
symbol | NULL-terminated string. |
Return the address of the code or data location specified by the string symbol
. handle
references a library that contains the function or variable symbol
.
If no error occurred, the returned value is the code or data location, otherwise the returned value is NULL and an error string can be retrived with dlerror().
Conformity: None.
Supported OS: Windows Vista, Windows XP or Windows 2000 Professional.
References evil_char_to_wchar().
Referenced by efl_quicklaunch_prepare(), eina_module_load(), eina_module_symbol_get(), eina_module_unload(), and elm_quicklaunch_prepare().
EVIL_API char * dlerror | ( | void | ) |
Get diagnostic information.
NULL-terminated
string if an error occurred, NULL
otherwise.Return a NULL-terminated
character string describing the last error that occurred on this thread during a call to dlopen(), dlsym(), or dlclose(). If no such error has occurred, dlerror() returns a null pointer. At each call to dlerror(), the error indication is reset. Thus in the case of two calls to dlerror(), where the second call follows the first immediately, the second call will always return a null pointer.
Conformity: None.
Supported OS: Windows Vista, Windows XP or Windows 2000 Professional.
Referenced by efl_quicklaunch_prepare(), eina_module_load(), and elm_quicklaunch_prepare().