RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.TTextRec Record

TTextRec is the internal format for text files.

Pascal
TTextRec = packed record
  Handle: Integer;
  Mode: Word;
  Flags: Word;
  BufSize: Cardinal;
  BufPos: Cardinal;
  BufEnd: Cardinal;
  BufPtr: PChar;
  OpenFunc: Pointer;
  InOutFunc: Pointer;
  FlushFunc: Pointer;
  CloseFunc: Pointer;
  UserData: array[1..32] of Byte;
  Name: array[0..259] of Char;
  Buffer: TTextBuf;
end;
C++
struct TTextRec {
  int Handle;
  Word Mode;
  Word Flags;
  unsigned BufSize;
  unsigned BufPos;
  unsigned BufEnd;
  const char * BufPtr;
  void * OpenFunc;
  void * InOutFunc;
  void * FlushFunc;
  void * CloseFunc;
  array[1..32] of Byte UserData;
  array[0..259] of Char Name;
  TTextBuf Buffer;
};

System

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.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!