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: PAnsiChar;
  OpenFunc: Pointer;
  InOutFunc: Pointer;
  FlushFunc: Pointer;
  CloseFunc: Pointer;
  UserData: array[1..32] of Byte;
  Name: array[0..259] of WideChar;
  Buffer: TTextBuf;
end;
C++
struct TTextRec {
  int Handle;
  Word Mode;
  Word Flags;
  unsigned BufSize;
  unsigned BufPos;
  unsigned BufEnd;
  PAnsiChar BufPtr;
  void * OpenFunc;
  void * InOutFunc;
  void * FlushFunc;
  void * CloseFunc;
  array[1..32] of Byte UserData;
  array[0..259] of WideChar Name;
  TTextBuf Buffer;
};

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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!