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) *)

C++

struct DECLSPEC_DRECORD TTextRec
{
public:
    System::NativeUInt Handle;
    Word Mode;
    Word Flags;
    unsigned BufSize;
    unsigned BufPos;
    unsigned BufEnd;
    System::PAnsiChar 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.