Final Platform Layer  0.9.6-beta
Data Structures | Typedefs | Functions
Dynamic library loading

This category contains functions for loading dynamic libraries. More...

Data Structures

struct  fplDynamicLibraryHandle
 A structure containing the internal handle to a dynamic library. More...
 
union  fplInternalDynamicLibraryHandle
 A union containing the library handle for any platform. More...
 

Typedefs

typedef struct fplDynamicLibraryHandle fplDynamicLibraryHandle
 A structure containing the internal handle to a dynamic library.
 
typedef union fplInternalDynamicLibraryHandle fplInternalDynamicLibraryHandle
 A union containing the library handle for any platform.
 

Functions

fpl_platform_api bool fplDynamicLibraryLoad (const char *libraryFilePath, fplDynamicLibraryHandle *outHandle)
 Loads a dynamic library and returns if the load was successful or not. More...
 
fpl_platform_api void fplDynamicLibraryUnload (fplDynamicLibraryHandle *handle)
 Unloads the loaded library and resets the handle to zero. More...
 
fpl_platform_api void * fplGetDynamicLibraryProc (const fplDynamicLibraryHandle *handle, const char *name)
 Returns the dynamic library procedure address for the given procedure name. More...
 

Detailed Description

This category contains functions for loading dynamic libraries.

Function Documentation

◆ fplDynamicLibraryLoad()

fpl_platform_api bool fplDynamicLibraryLoad ( const char *  libraryFilePath,
fplDynamicLibraryHandle outHandle 
)

Loads a dynamic library and returns if the load was successful or not.

Parameters
libraryFilePathThe path to the library with included file extension (.dll / .so)
outHandleThe output handle fplDynamicLibraryHandle
Returns
Returns true when the library was loaded successfully, false otherwise.
See also
Loading a dynamic library

◆ fplDynamicLibraryUnload()

fpl_platform_api void fplDynamicLibraryUnload ( fplDynamicLibraryHandle handle)

Unloads the loaded library and resets the handle to zero.

Parameters
handleThe library handle fplDynamicLibraryHandle
See also
fplDynamicLibraryUnload

◆ fplGetDynamicLibraryProc()

fpl_platform_api void* fplGetDynamicLibraryProc ( const fplDynamicLibraryHandle handle,
const char *  name 
)

Returns the dynamic library procedure address for the given procedure name.

Parameters
handleThe fplDynamicLibraryHandle handle to the loaded library
nameThe name of the procedure
Returns
Returns the procedure address for the given procedure name or fpl_null when procedure not found or library is not loaded.
See also
Getting a procedure address