| | | 1 | | // <auto-generated/> |
| | | 2 | | namespace ArturRios.Logging |
| | | 3 | | { |
| | | 4 | | internal static unsafe partial class ConsoleAnsi |
| | | 5 | | { |
| | | 6 | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.700 |
| | | 7 | | [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute] |
| | | 8 | | private static partial nint GetStdHandle(int nStdHandle) |
| | 2 | 9 | | { |
| | | 10 | | int __lastError; |
| | | 11 | | nint __retVal; |
| | 2 | 12 | | { |
| | 2 | 13 | | global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0); |
| | 2 | 14 | | __retVal = __PInvoke(nStdHandle); |
| | 2 | 15 | | __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError(); |
| | 2 | 16 | | } |
| | | 17 | | |
| | 2 | 18 | | global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError); |
| | 2 | 19 | | return __retVal; |
| | | 20 | | // Local P/Invoke |
| | | 21 | | [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetStdHandle", Exac |
| | | 22 | | static extern unsafe nint __PInvoke(int __nStdHandle_native); |
| | 2 | 23 | | } |
| | | 24 | | } |
| | | 25 | | } |
| | | 26 | | namespace ArturRios.Logging |
| | | 27 | | { |
| | | 28 | | internal static unsafe partial class ConsoleAnsi |
| | | 29 | | { |
| | | 30 | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.700 |
| | | 31 | | [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute] |
| | | 32 | | private static partial bool GetConsoleMode(nint hConsoleHandle, out uint lpMode) |
| | 2 | 33 | | { |
| | | 34 | | int __lastError; |
| | 2 | 35 | | lpMode = default; |
| | | 36 | | bool __retVal; |
| | | 37 | | int __retVal_native; |
| | | 38 | | // Pin - Pin data in preparation for calling the P/Invoke. |
| | 2 | 39 | | fixed (uint* __lpMode_native = &lpMode) |
| | 2 | 40 | | { |
| | 2 | 41 | | global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0); |
| | 2 | 42 | | __retVal_native = __PInvoke(hConsoleHandle, __lpMode_native); |
| | 2 | 43 | | __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError(); |
| | 2 | 44 | | } |
| | | 45 | | |
| | | 46 | | // Unmarshal - Convert native data to managed data. |
| | 2 | 47 | | __retVal = __retVal_native != 0; |
| | 2 | 48 | | global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError); |
| | 2 | 49 | | return __retVal; |
| | | 50 | | // Local P/Invoke |
| | | 51 | | [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetConsoleMode", Ex |
| | | 52 | | static extern unsafe int __PInvoke(nint __hConsoleHandle_native, uint* __lpMode_native); |
| | 2 | 53 | | } |
| | | 54 | | } |
| | | 55 | | } |
| | | 56 | | namespace ArturRios.Logging |
| | | 57 | | { |
| | | 58 | | internal static unsafe partial class ConsoleAnsi |
| | | 59 | | { |
| | | 60 | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.700 |
| | | 61 | | [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute] |
| | | 62 | | private static partial bool SetConsoleMode(nint hConsoleHandle, uint dwMode) |
| | 0 | 63 | | { |
| | | 64 | | int __lastError; |
| | | 65 | | bool __retVal; |
| | | 66 | | int __retVal_native; |
| | 0 | 67 | | { |
| | 0 | 68 | | global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0); |
| | 0 | 69 | | __retVal_native = __PInvoke(hConsoleHandle, dwMode); |
| | 0 | 70 | | __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError(); |
| | 0 | 71 | | } |
| | | 72 | | |
| | | 73 | | // Unmarshal - Convert native data to managed data. |
| | 0 | 74 | | __retVal = __retVal_native != 0; |
| | 0 | 75 | | global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError); |
| | 0 | 76 | | return __retVal; |
| | | 77 | | // Local P/Invoke |
| | | 78 | | [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "SetConsoleMode", Ex |
| | | 79 | | static extern unsafe int __PInvoke(nint __hConsoleHandle_native, uint __dwMode_native); |
| | 0 | 80 | | } |
| | | 81 | | } |
| | | 82 | | } |