Arcade architecture
DynamicLib.hpp File Reference

Header file for dynamic library handling functions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * openDynamicLib (const char *path)
 Opens a dynamic library. More...
 
void * getFunctionDynamicLib (void *moduleHandle, const char *name)
 Retrieves a function or symbol from a dynamic library. More...
 
void closeDynamicLib (void *moduleHandle)
 Closes a dynamic library. More...
 
const char * getDlError (void)
 Retrieves the last dynamic library error message. More...
 

Detailed Description

Header file for dynamic library handling functions.

This file provides declarations for functions to load, retrieve symbols from, and close dynamic libraries, as well as retrieve error messages related to dynamic library operations.

Author
EPITECH PROJECT
Date
2025

Function Documentation

◆ closeDynamicLib()

void closeDynamicLib ( void *  moduleHandle)

Closes a dynamic library.

This function closes a previously loaded dynamic library and releases associated resources.

Parameters
moduleHandleThe handle to the loaded dynamic library.

◆ getDlError()

const char * getDlError ( void  )

Retrieves the last dynamic library error message.

This function returns a string describing the last error that occurred during a dynamic library operation.

Returns
A string describing the last error, or nullptr if no error occurred.

◆ getFunctionDynamicLib()

void * getFunctionDynamicLib ( void *  moduleHandle,
const char *  name 
)

Retrieves a function or symbol from a dynamic library.

This function retrieves the address of a function or symbol from a loaded dynamic library using its handle and the symbol's name.

Parameters
moduleHandleThe handle to the loaded dynamic library.
nameThe name of the function or symbol to retrieve.
Returns
A pointer to the function or symbol, or nullptr if an error occurs.

◆ openDynamicLib()

void * openDynamicLib ( const char *  path)

Opens a dynamic library.

This function loads a dynamic library from the specified path and returns a handle to the loaded library.

Parameters
pathThe file path to the dynamic library.
Returns
A handle to the loaded library, or nullptr if an error occurs.