mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-15 15:19:57 +00:00
721ee8e494
* Move shared code to Shared project * Move from Realm to Squealify * Rename Daybreak.Shared namespaces * Setup API project to expose a test API
29 lines
989 B
C#
29 lines
989 B
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace Daybreak.API;
|
|
|
|
internal static partial class NativeMethods
|
|
{
|
|
public const int STD_OUTPUT_HANDLE = -11;
|
|
public const uint ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004;
|
|
public const uint ENABLE_PROCESSED_OUTPUT = 0x0001;
|
|
|
|
[LibraryImport("kernel32.dll", SetLastError = true)]
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|
public static partial bool AllocConsole();
|
|
|
|
[LibraryImport("kernel32.dll", SetLastError = true)]
|
|
public static partial nint GetConsoleWindow();
|
|
|
|
[LibraryImport("kernel32.dll", SetLastError = true)]
|
|
public static partial nint GetStdHandle(int nStdHandle);
|
|
|
|
[LibraryImport("kernel32.dll")]
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|
public static partial bool GetConsoleMode(nint hConsoleHandle, out uint lpMode);
|
|
|
|
[LibraryImport("kernel32.dll")]
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|
public static partial bool SetConsoleMode(nint hConsoleHandle, uint dwMode);
|
|
}
|