SharedLibLoader

Undocumented in source.

Constructors

this
this(string libNames)

Constructs a new instance of shared lib loader with a string of one or more shared library names to use as default.

Members

Functions

bindFunc
void bindFunc(void** ptr, string funcName, bool doThrow)

Binds a function pointer to a symbol in this loader's shared library.

bindFunc_stdcall
void bindFunc_stdcall(Func f, string unmangledName)

Binds a function pointer to a stdcall symbol in this loader's shared library.

configureMinimumVersion
void configureMinimumVersion(SharedLibVersion minVersion)

Allows a subclass to install an exception handler for specific versions of a library before loadSymbols is called.

load
void load()

Finds and loads a shared library, using this loader's default shared library names and default supported shared library version.

load
void load(SharedLibVersion minRequiredVersion)

Finds and loads any version of a shared library greater than or equal to the required mimimum version, using this loader's default shared library names.

load
void load(string libNames)

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

load
void load(string libNames, SharedLibVersion minRequiredVersion)

Finds and loads any version of a shared library greater than or equal to the required mimimum version, using libNames to find the library on the file system.

load
void load(string[] libNames)

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

load
void load(string[] libNames, SharedLibVersion minRequiredVersion)

Finds and loads any version of a shared library greater than or equal to the required mimimum version, , using libNames to find the library on the file system.

loadSymbol
void* loadSymbol(string name, bool doThrow)

Subclasses can use this as an alternative to bindFunc, but must bind the returned symbol manually.

loadSymbols
void loadSymbols()

Must be implemented by subclasses to load all of the symbols 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]
lib
SharedLib lib [@property getter]

Returns a reference to the shared library wrapped by this loader.

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.

Meta