Skip to content

Dynamic library loading

Finalspace edited this page May 29, 2026 · 1 revision

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

Data Structures

Type Name
struct fplDynamicLibraryHandle
Stores the internal handle to a dynamic library. More...
union fplInternalDynamicLibraryHandle
Stores the library handle for any platform. More...

Functions

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

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

Direction Parameter Description
[in] libraryFilePath The path to the library with included file extension (.dll / .so).
[out] outHandle Reference to the output library 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

Direction Parameter Description
[in,out] handle Reference to the library handle fplDynamicLibraryHandle.

See also: fplDynamicLibraryLoad

fplGetDynamicLibraryProc()

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

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

Parameters

Direction Parameter Description
[in] handle Reference to the library handle fplDynamicLibraryHandle.
[in] name The name of the procedure.

Returns: Returns the procedure address for the given procedure name, or

fpl_null when the procedure is not found or the library is not loaded.

See also: Getting a procedure address

Final Platform Layer

Pages

Topics

Data Structures

Clone this wiki locally