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

    Function writeValue

    • Write a typed value to a buffer at a given offset.

      Type Parameters

      Parameters

      • ptr: MemorySource

        Buffer to write to

      • type: T

        Type to write (e.g. c_int32, c_double)

      • value: JsArgFromCType<T>

        Value to write

      • Optionaloffset: number

        Byte offset, a non-negative safe integer (default 0): a non-number is a TypeError, NaN, Infinity, a fraction or a negative value a RangeError

      Returns number | void

    • Write a typed value to a buffer at a given offset.

      Parameters

      • ptr: MemorySource

        Buffer to write to

      • type: AnyType | StructureClass

        Type to write (e.g. c_int32, c_double)

      • value: any

        Value to write

      • Optionaloffset: number

        Byte offset, a non-negative safe integer (default 0): a non-number is a TypeError, NaN, Infinity, a fraction or a negative value a RangeError

      Returns number | void