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

    Interface SimpleCDataConstructor<Tag>

    interface SimpleCDataConstructor<Tag extends string = string> {
        new SimpleCDataConstructor(
            value?: any,
        ): SimpleCDataInstance<JsFromTag<Tag>, Tag>;
        _size: number;
        _type: number;
        _type_?: string;
        __ctype_be__: SwappedConstructor<Tag>;
        __ctype_le__: SwappedConstructor<Tag>;
        __pointer_type__?: PointerTypeDef<SimpleCDataConstructor<Tag>>;
        from_param(value: any): any;
        from_buffer<T extends SimpleCDataConstructor<Tag>>(
            this: T,
            buffer: ArrayBufferView<ArrayBufferLike> | { _buffer: Buffer },
            offset?: BufferOffset,
        ): InstanceType<T>;
        from_buffer_copy<T extends SimpleCDataConstructor<Tag>>(
            this: T,
            buffer:
                | ReadonlyMemoryView
                | ArrayBufferView<ArrayBufferLike>
                | { _buffer: Buffer },
            offset?: BufferOffset,
        ): InstanceType<T>;
        from_address<T extends SimpleCDataConstructor<Tag>>(
            this: T,
            address: number | bigint,
        ): InstanceType<T>;
        in_dll<T extends SimpleCDataConstructor<Tag>>(
            this: T,
            library: Library | CDLL,
            name: string,
        ): InstanceType<T>;
    }

    Type Parameters

    • Tag extends string = string
    Index
    _size: number

    Size of this type in bytes.

    _type: number

    CType numeric identifier.

    _type_?: string

    Python ctypes single-character type code (e.g. 'i', 'd', 'P'). It is platform-dependent, as in Python: 'l' for c_int32 on Windows, 'l' / 'L' for c_int64 / c_uint64 on LP64 systems.

    __ctype_be__: SwappedConstructor<Tag>

    Big-endian variant of this scalar type (c_int.__ctype_be__), undefined for c_void_p, c_char_p, c_wchar_p, c_wchar and VARIANT_BOOL (as in Python). c_bool.__ctype_be__ reads and writes numbers (uint8 semantics).

    __ctype_le__: SwappedConstructor<Tag>

    Little-endian variant of this scalar type (c_int.__ctype_le__), undefined where __ctype_be__ is.

    Python 3.14 T.__pointer_type__: the type POINTER(T) returns, set by the first POINTER(T) (undefined before, not inherited by subclasses). Writable and deletable; POINTER(T) returns what it holds.

    • Default CPython-compatible parameter adapter hook.

      Parameters

      • value: any

      Returns any

    • Create an instance that aliases an existing Buffer (zero-copy).

      Type Parameters

      Parameters

      • this: T
      • buffer: ArrayBufferView<ArrayBufferLike> | { _buffer: Buffer }
      • Optionaloffset: BufferOffset

      Returns InstanceType<T>

    • Create an instance whose buffer is a copy of the source bytes.

      Type Parameters

      Parameters

      • this: T
      • buffer: ReadonlyMemoryView | ArrayBufferView<ArrayBufferLike> | { _buffer: Buffer }
      • Optionaloffset: BufferOffset

      Returns InstanceType<T>