Veritable Lasagna
An Allocator & Data Structure Library for C.
Loading...
Searching...
No Matches
vl_dynlib_posix.c File Reference
#include <dlfcn.h>
+ Include dependency graph for vl_dynlib_posix.c:

Functions

vl_dynlib_result vlLibraryOpen (const char *name, vl_dynlib *lib)
 Opens a dynamic library.
 
vl_dynlib_result vlLibraryClose (vl_dynlib *lib)
 Closes a dynamic library.
 
vl_dynlib_result vlLibraryProc (vl_dynlib lib, const char *name, void **proc)
 Gets a procedure address from a dynamic library.
 
const char * vlLibraryError (void)
 Gets the last error message from dynamic loading operations.
 

Function Documentation

◆ vlLibraryClose()

vl_dynlib_result vlLibraryClose ( vl_dynlib *  lib)

Closes a dynamic library.

Parameters
[in,out]libPointer to the library handle (will be set to NULL after closing)
Returns
Result code indicating success or failure

◆ vlLibraryError()

const char * vlLibraryError ( void  )

Gets the last error message from dynamic loading operations.

Returns
Error message string or NULL if no error

◆ vlLibraryOpen()

vl_dynlib_result vlLibraryOpen ( const char *  name,
vl_dynlib *  lib 
)

Opens a dynamic library.

Parameters
namePath to the library
[out]libPointer to store the library handle
Returns
Result code indicating success or failure

◆ vlLibraryProc()

vl_dynlib_result vlLibraryProc ( vl_dynlib  lib,
const char *  name,
void **  proc 
)

Gets a procedure address from a dynamic library.

Parameters
libPointer to the library handle
nameName of the procedure to look up
[out]procPointer to store the procedure address
Returns
Result code indicating success or failure