}         // proc GetConsoleScreenBufferInfoEx

        private static void SetConsoleScreenBufferInfoEx(IntPtr hConsole, bool all, ref ConsoleScreenBufferInfoEx bufferInfo)
        {
            if (!UnsafeNativeMethods.SetConsoleScreenBufferInfoEx(hConsole, ref bufferInfo))
            {
                throw new Win32Exception();
            }
            if (all)
            {
                SetConsoleCursorPosition(hConsole, bufferInfo.dwCursorPosition);
            }
        }         // proc SetConsoleScreenBufferInfoEx
        }         // proc Copy

        #endregion

        #region -- Buffer -------------------------------------------------------------

        private static void GetConsoleScreenBufferInfoEx(IntPtr hConsole, out ConsoleScreenBufferInfoEx bufferInfo)
        {
            bufferInfo = new ConsoleScreenBufferInfoEx()
            {
                cbSize = ConsoleScreenBufferInfoEx.Size
            };
            if (!UnsafeNativeMethods.GetConsoleScreenBufferInfoEx(hConsole, ref bufferInfo))
            {
                throw new Win32Exception();
            }
        }         // proc GetConsoleScreenBufferInfoEx
Exemple #3
0
 public static extern bool SetConsoleScreenBufferInfoEx([In] IntPtr hConsoleOutput, [In] ref ConsoleScreenBufferInfoEx lpConsoleScreenBufferInfo);