unit VfsTestHelper; (* *) (***) interface (***) uses SysUtils, Windows, Utils; (* Initializes debug console *) procedure InitConsole; (***) implementation (***) procedure InitConsole; var Rect: TSmallRect; BufSize: TCoord; hIn: THandle; hOut: THandle; begin AllocConsole; SetConsoleCP(GetACP); SetConsoleOutputCP(GetACP); hIn := GetStdHandle(STD_INPUT_HANDLE); hOut := GetStdHandle(STD_OUTPUT_HANDLE); pinteger(@System.Input)^ := hIn; pinteger(@System.Output)^ := hOut; BufSize.x := 120; BufSize.y := 1000; SetConsoleScreenBufferSize(hOut, BufSize); Rect.Left := 0; Rect.Top := 0; Rect.Right := 120 - 1; Rect.Bottom := 50 - 1; SetConsoleWindowInfo(hOut, true, Rect); SetConsoleTextAttribute(hOut, (0 shl 4) or $0F); end; // .procedure InitConsole; end.