# Module dynlib

This module implements the ability to access symbols from shared libraries. On POSIX this uses the `dlsym` mechanism, on Windows `LoadLibrary`.

# Types

    TLibHandle = pointer

  a handle to a dynamically loaded library

# Procs

    proc raiseInvalidLibrary(name: cstring) {.noinline, noreturn,
        raises: [EInvalidLibrary], tags: [].}

  raises an EInvalidLibrary exception.

    proc checkedSymAddr(lib: TLibHandle; name: cstring): pointer {.
        raises: [E_Base, EInvalidLibrary], tags: [TEffect].}

  retrieves the address of a procedure/variable from lib. Raises EInvalidLibrary if the symbol could not be found.

    proc LoadLib(path: string): TLibHandle {.raises: [], tags: [].}

  loads a library from path. Returns nil if the library could not be loaded.

    proc LoadLib(): TLibHandle {.raises: [], tags: [].}

  gets the handle from the current executable. Returns nil if the library could not be loaded.

    proc UnloadLib(lib: TLibHandle) {.raises: [], tags: [].}

  unloads the library lib

    proc symAddr(lib: TLibHandle; name: cstring): pointer {.raises: [], tags: [].}

  retrieves the address of a procedure/variable from lib. Returns nil if the symbol could not be found.

Generated: 2013-05-21 09:55:09 UTC