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

    Interface LibraryOptions

    Options passed to the CDLL/WinDLL/OleDLL constructor.

    interface LibraryOptions {
        mode?: number;
        winmode?: number;
        cacheSize?: number;
        use_last_error?: boolean;
        use_errno?: boolean;
        handle?: number | bigint;
    }
    Index
    mode?: number

    dlopen flags combined with RTLD_NOW (e.g. RTLD_GLOBAL). Ignored on Windows. Default: DEFAULT_MODE.

    Python ctypes parity: the mode argument of CDLL(name, mode).

    winmode?: number

    LoadLibraryExW flags (Windows only). Default: LOAD_LIBRARY_SEARCH_DEFAULT_DIRS, plus LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR (with the path made absolute) when the name contains a path separator.

    Python ctypes parity: the winmode argument of CDLL(name, winmode=...).

    cacheSize?: number

    Maximum size of the internal function cache. Default: 1000.

    use_last_error?: boolean

    If true, each call through this library snapshots GetLastError() immediately after ffi_call returns, so subsequent JS code cannot clobber it before the user reads it via CDLL.get_last_error.

    Python ctypes parity: use_last_error=True on CDLL/WinDLL.

    use_errno?: boolean

    If true, each call through this library snapshots errno immediately after ffi_call returns. Read back via CDLL.get_errno.

    Python ctypes parity: use_errno=True on CDLL.

    handle?: number | bigint

    Pre-loaded native module handle (CDLL(name, { handle }), Python ctypes: handle=). The library wraps the handle without taking ownership (close() will not unload it). As in CPython, 0 / 0n is used as the handle (glibc RTLD_DEFAULT); only null / undefined mean "load by name". A negative value is masked to the pointer width (e.g. -1 for glibc RTLD_NEXT) and _handle keeps the given value (-1n); a value outside the pointer range is a RangeError could not convert the _handle attribute to a pointer, a non-integer Number a RangeError Library handle must be a valid safe integer.