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

    Interface NativeFFIFunction<TArgs, TRet>

    Low-level native function handle returned by Library.func.

    Unlike the functions returned by CDLL.func, it is not directly callable: invoke it with call().

    interface NativeFFIFunction<
        TArgs extends readonly FFIType[] = FFIType[],
        TRet extends FFIType | null = FFIType,
    > {
        call(...args: FFIArgs<TArgs>): FFIReturn<TRet>;
        callAsync(...args: FFIArgs<TArgs>): Promise<FFIReturn<TRet>>;
        setErrcheck(callback: NativeErrcheckCallback<TArgs, TRet>): void;
        getCapturedLastError(): number;
        getCapturedErrno(): number;
        name: string;
        address: bigint;
    }

    Type Parameters

    Index
    name: string

    The function name, or its hex address for raw function pointers.

    address: bigint

    The function address as BigInt.

    • GetLastError() (Windows) or errno captured after the last call, with use_last_error.

      Returns number

    • errno captured after the last call, with use_errno.

      Returns number