int gettext(int left, int top, int right, int bottom, void *destin);
Copies text from text mode screen to memory.
gettext stores the contents of an onscreen text rectangle defined by left, top, right, and bottom into the area of memory pointed to by destin.
All coordinates are absolute screen coordinates not window-relative. The upper left corner is (1,1). gettext reads the contents of the rectangle into memory sequentially from left to right and top to bottom.
Each position onscreen takes 2 bytes of memory: The first byte is the character in the cell and the second is the cell's video attribute. The space required for a rectangle w columns wide by h rows high is defined as
bytes = (h rows) x (w columns) x 2
Note: Do not use this function for Win32s or Win32 GUI applications.
gettext returns 1 if the operation succeeds.
On error, it returns 0 (for example, if it fails because you gave coordinates outside the range of the current screen mode).
Borland C++ 5.0 Programmer's Guide