Show: Delphi C++
Display Preferences

System.TTextRec

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

  TTextRec = packed record (* must match the size the compiler generates: 730 bytes (754 bytes for x64) *)
    Handle: NativeInt;       (* must overlay with TFileRec *)
    Mode: Word;
    Flags: Word;
    BufSize: Cardinal;
    BufPos: Cardinal;
    BufEnd: Cardinal;
    BufPtr: _PAnsiChr;
    OpenFunc: Pointer;
    InOutFunc: Pointer;
    FlushFunc: Pointer;
    CloseFunc: Pointer;
    UserData: array[1..32] of Byte;
    Name: array[0..259] of WideChar;
    Buffer: TTextBuf;
    CodePage: Word;
    MBCSLength: ShortInt;
    MBCSBufPos: Byte;
    case Integer of
      0: (MBCSBuffer: array[0..5] of _AnsiChr);
      1: (UTF16Buffer: array[0..2] of WideChar);
  end;

C++

struct DECLSPEC_DRECORD TTextRec
{
public:
    NativeInt Handle;
    Word Mode;
    Word Flags;
    unsigned BufSize;
    unsigned BufPos;
    unsigned BufEnd;
    char *BufPtr;
    void *OpenFunc;
    void *InOutFunc;
    void *FlushFunc;
    void *CloseFunc;
    System::StaticArray<Byte, 32> UserData;
    System::StaticArray<WideChar, 260> Name;
    TTextBuf Buffer;
    Word CodePage;
    Int8 MBCSLength;
    Byte MBCSBufPos;
public:
    union
    {
        struct
        {
            System::StaticArray<WideChar, 3> UTF16Buffer;
        };
        struct
        {
            System::StaticArray<char, 6> MBCSBuffer;
        };
    };
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.pas
System.hpp
System System

Description

TTextRec is the internal format for text files.

TTextRec is the internal format of a Delphi variable of type text. You would never declare a variable of this type. However, you can use TTextRec to typecast a text file variable to access the internal data fields, such as the file name.

TextBuf is the type of the buffer entry in the TTextRec record, and indicates the size of the buffer used.

Note: Do not use this unless you are familiar with writing text file device drivers for the Delphi language.
Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance