SharedLib

Low-level wrapper of the even lower-level operating-specific shared library loading interface.

While this interface can be used directly in applications, it is recommended to use the interface specified by derelict.util.loader.SharedLibLoader to implement bindings. SharedLib is designed to be the base of a higher-level loader, but can be used in a program if only a handful of functions need to be loaded from a given shared library.

Members

Functions

load
void load(string[] names)

Finds and loads a shared library, using names to find the library on the file system.

loadSymbol
void* loadSymbol(string symbolName, bool doThrow = true)

Loads the symbol specified by symbolName from a shared library.

unload
void unload()

Unloads the shared library from memory, invalidating all function pointers which were assigned a symbol by one of the load methods.

Properties

isLoaded
bool isLoaded [@property getter]

Returns true if the shared library is currently loaded, false otherwise.

missingSymbolCallback
MissingSymbolCallbackDg missingSymbolCallback [@property setter]

Sets the callback that will be called when an expected symbol is missing from the shared library.

missingSymbolCallback
MissingSymbolCallbackFunc missingSymbolCallback [@property setter]

Sets the callback that will be called when an expected symbol is missing from the shared library.

missingSymbolCallback
MissingSymbolCallback missingSymbolCallback [@property getter]

Returns the currently active missing symbol callback.

name
string name [@property getter]

Returns the name of the shared library.

Meta