DynamicLib

This struct encapsulates functionality for working with dynamic libraries.

This struct is neither default constructable nor copyable. Pass it by ref to functions or use $(STDREF typecons, RefCounted).

Constructors

this
this()
Undocumented in source.
this
this(DynamicLibHandle handle, bool own)

Construct a DynamicLib from a manually obtained DynamicLibHandle.

this
this(char[] name, bool search)

Construct a DynamicLib with the library name.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

call
auto ref call(char[] functionName, ParameterTypeTuple!T params)

Calls the function named functionName from this dynamic library.

close
void close()

Closes native handle and makes the struct unassociated.

opBinaryRight
void* opBinaryRight(char[] symbolName)

Returns the address of a symbol named symbolName or null if it is not found.

opIndex
void* opIndex(char[] symbolName)

Returns the address of a symbol named symbolName.

var
T var(char[] varName)

Returns the reference to the variable named varName from this dynamic library.

Properties

associated
bool associated [@property getter]

Returns whether this is associated with a dynamic library handle. It is asserted that no member functions are called for an unassociated DynamicLib struct.

handle
inout(DynamicLibHandle) handle [@property getter]

Gets native handle of the associated dynamic library.

ownHandle
bool ownHandle [@property getter]

Returns whether handle of the associated dynamic library will be closed on destruction.

Meta