using System; using System.Runtime.InteropServices; namespace S7.Net.UnitTest.Helpers { internal static class NativeMethods { [StructLayout(LayoutKind.Sequential)] public struct CURSORINFO { public Int32 cbSize; public Int32 flags; public IntPtr hCursor; public POINTAPI ptScreenPos; } [StructLayout(LayoutKind.Sequential)] public struct POINTAPI { public int x; public int y; } [DllImport("user32.dll")] public static extern int BringWindowToTop(IntPtr hwnd); [DllImport("kernel32.dll")] public static extern bool AllocConsole(); [DllImport("kernel32.dll")] public static extern bool FreeConsole(); [DllImport("kernel32.dll")] public static extern IntPtr GetConsoleWindow(); [DllImport("kernel32.dll")] public static extern int GetConsoleOutputCP(); [DllImport("user32.dll")] public static extern bool GetCursorInfo(out CURSORINFO pci); [DllImport("user32.dll")] public static extern bool DrawIcon(IntPtr hDC, int X, int Y, IntPtr hIcon); } }