bind

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

  1. void bind(DynamicLib lib, char[] symbolName)
    @system
    void
    bind
    (
    alias sym
    )
    (
    auto ref DynamicLib lib
    ,
    in char[] symbolName = sym.stringof
    )
    if (
    !is(sym)
    )
  2. T bind(DynamicLib lib)

Throws

Exception if the symbol is not found or has null address.

Examples

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

Meta