node-ctypes - v2.10.0
    Preparing search index...

    Class CDLL

    Hierarchy (View Summary)

    Indexable

    • [funcName: string]: any

      Python-like function access. Accessing any property returns a FunctionWrapper that supports argtypes/restype assignment.

    Index
    • Parameters

      • path: string

        Path to the shared library, or null to load the current process

      • Optionaloptions: number | LibraryOptions

        dlopen mode (as Python's CDLL(name, mode)) or library settings (mode, cache size, use_last_error, use_errno)

      Returns CDLL

    path: string

    Library file path.

    loaded: boolean

    Whether the logical handle is open, independently of physical module residency.

    • Get the address of a symbol.

      Parameters

      • name: string

        Symbol name

      Returns bigint

      Address as BigInt

    • Close the library and clear the function cache. Functions obtained from it throw when called afterwards. Throws while a call to one of its functions is in progress (from a callback, or a pending callAsync()). Existing in_dll() views defer native handle release until their dependent memory is collected, but new calls and symbol lookups are rejected. Physical unloading depends on the OS loader; musl keeps modules resident.

      Returns void

    • Close the library at the end of a using block.

      Returns void

    • Read the snapshotted GetLastError() (Windows) or errno from the most recent call on this library. Requires use_last_error: true at construction.

      Python ctypes parity: ctypes.get_last_error() (library-scoped variant).

      Returns number

    • Read the snapshotted errno from the most recent call on this library. Requires use_errno: true at construction.

      Python ctypes parity: ctypes.get_errno() (library-scoped variant).

      Returns number