Esempio n. 1
0
        private ConsoleScreenBufferInfo GetScreenBufferInfo()
        {
            if (disposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }
            ConsoleScreenBufferInfo csbi = new ConsoleScreenBufferInfo();

            if (!WinCon.GetConsoleScreenBufferInfo(_handle, csbi))
            {
                int err = Marshal.GetLastWin32Error();
                Console.WriteLine("err = {0}", err);
                throw new IOException("Error getting screen buffer info", err);
            }
            return(csbi);
        }