VLC 4.0.0-dev
plugin.c File Reference
Include dependency graph for plugin.c:

Functions

void * vlc_dlopen (const char *path, bool lazy)
 Loads a dynamically linked library. More...
 
int vlc_dlclose (void *handle)
 Unloads a dynamic library. More...
 
void * vlc_dlsym (void *handle, const char *name)
 Looks up a symbol from a dynamically loaded library. More...
 
char * vlc_dlerror (void)
 Formats an error message for vlc_dlopen() or vlc_dlsym(). More...
 

Function Documentation

◆ vlc_dlclose()

int vlc_dlclose ( void *  handle)

Unloads a dynamic library.

This function unloads a previously opened dynamically linked library using a system dependent method.

Parameters
handlehandle of the library
Return values
0on success
-1on error (none are defined though)

◆ vlc_dlerror()

char * vlc_dlerror ( void  )

Formats an error message for vlc_dlopen() or vlc_dlsym().

Returns
a heap-allocated nul-terminated error string, or NULL.

References strdup().

◆ vlc_dlopen()

void * vlc_dlopen ( const char *  path,
bool  lazy 
)

Loads a dynamically linked library.

Parameters
pathlibrary file path
lazywhether to resolve the symbols lazily
Returns
a module handle on success, or NULL on error.

References VLC_UNUSED.

◆ vlc_dlsym()

void * vlc_dlsym ( void *  handle,
const char *  psz_function 
)

Looks up a symbol from a dynamically loaded library.

This function looks for a named symbol within a loaded library.

Parameters
handlehandle to the library
namefunction name
Returns
the address of the symbol on success, or NULL on error
Note
If the symbol address is NULL, errors cannot be detected. However, normal symbols such as function or global variables cannot have NULL as their address.

References name.