tryBind

Tries to set sym to point to a symbol named symbolName in dynamic library lib.

@system
bool
tryBind
(
alias sym
)
(
auto ref DynamicLib lib
,
in char[] symbolName = sym.stringof
)

Examples

extern(C) alias F = void function(int) nothrow;
F f;
if(dynLib.tryBind!f())
	f(5);

Meta