diff --git a/src/PrettyPrompt/Console/SystemConsole.cs b/src/PrettyPrompt/Console/SystemConsole.cs index 83b2ca9..fc7925d 100644 --- a/src/PrettyPrompt/Console/SystemConsole.cs +++ b/src/PrettyPrompt/Console/SystemConsole.cs @@ -64,11 +64,11 @@ public void InitVirtualTerminalProcessing() } } - [DllImport("kernel32")] + [DllImport("kernel32", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool GetConsoleMode(IntPtr hConsoleHandle, out uint lpMode); - [DllImport("kernel32")] + [DllImport("kernel32", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode);