Esempio n. 1
0
 public static extern bool GetConsoleScreenBufferInfo(IntPtr hOut, out ConsoleScreenBufferInfo csbi);
Esempio n. 2
0
 public static extern bool GetConsoleScreenBufferInfo(IntPtr hOut, out ConsoleScreenBufferInfo csbi);
Esempio n. 3
0
        /// <summary>
        /// Retrieves information about the specified console screen buffer.
        /// </summary>
        /// <param name="hConsoleOutput">
        /// [in] A handle to the console screen buffer. The handle must have the <see cref="ConsoleAccess.GENERIC_READ"/>
        /// access right.
        /// </param>
        /// <returns>
        /// A <see cref="ConsoleScreenBufferInfo"/> structure that receives the console screen buffer information.
        /// </returns>
        public static ConsoleScreenBufferInfo GetConsoleScreenBufferInfo(SafeConsoleHandle hConsoleOutput)
        {
            var lpConsoleScreenBufferInfo = new ConsoleScreenBufferInfo();
            WinError.ThrowLastWin32ErrorIfFailed(
                GetConsoleScreenBufferInfo(hConsoleOutput, lpConsoleScreenBufferInfo));

            return lpConsoleScreenBufferInfo;
        }
Esempio n. 4
0
 private static extern Boolean GetConsoleScreenBufferInfo(
     IntPtr hConsoleOutput,
     out ConsoleScreenBufferInfo lpConsoleScreenBufferInfo);
 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;
 }
Esempio n. 6
0
 public static extern bool GetConsoleScreenBufferInfo(
     IntPtr hConsoleOutput,
     out ConsoleScreenBufferInfo lpConsoleScreenBufferInfo
     );
Esempio n. 7
0
 private static extern int GetConsoleScreenBufferInfo(int hConsoleOutput,
                                                      ref ConsoleScreenBufferInfo lpConsoleScreenBufferInfo);
Esempio n. 8
0
        public void GetConsoleScreenBufferInfo()
        {
            SafeConsoleHandle handle = CreateConsoleScreenBuffer(ConsoleAccess.GENERIC_READ);

            var info = new ConsoleScreenBufferInfo();
            bool result = WinConsole.GetConsoleScreenBufferInfo(handle, info);
            Trace.WriteLine(TestHelpers.ObjectToString(info));

            Assert.That(result, Is.True);
        }
Esempio n. 9
0
 static extern bool GetConsoleScreenBufferInfo(IntPtr consoleOutput, out ConsoleScreenBufferInfo info);
Esempio n. 10
0
 private static extern int GetConsoleScreenBufferInfo(int hConsoleOutput, 
     out ConsoleScreenBufferInfo lpConsoleScreenBufferInfo);