File: _generated\1\LibraryImports.g.cs
Web Access
Project: src\runtime\src\libraries\Microsoft.Extensions.Logging.Console\src\Microsoft.Extensions.Logging.Console.csproj (Microsoft.Extensions.Logging.Console)
// <auto-generated/>
internal static partial class Interop
{
    internal static partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.37520")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial bool GetConsoleMode(nint handle, out int mode)
        {
            unsafe
            {
                int __lastError;
                mode = default;
                bool __retVal;
                int __retVal_native;
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (int* __mode_native = &mode)
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(handle, __mode_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native != 0;
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetConsoleMode", ExactSpelling = true)]
                [global::System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute((global::System.Runtime.InteropServices.DllImportSearchPath)2048)]
                static extern unsafe int __PInvoke(nint __handle_native, int* __mode_native);
            }
        }
    }
}
internal static partial class Interop
{
    internal static partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.37520")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial bool SetConsoleMode(nint handle, int mode)
        {
            unsafe
            {
                int __lastError;
                bool __retVal;
                int __retVal_native;
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(handle, mode);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native != 0;
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "SetConsoleMode", ExactSpelling = true)]
                [global::System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute((global::System.Runtime.InteropServices.DllImportSearchPath)2048)]
                static extern unsafe int __PInvoke(nint __handle_native, int __mode_native);
            }
        }
    }
}
internal static partial class Interop
{
    internal static partial class Kernel32
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetStdHandle", ExactSpelling = true)]
        internal static extern partial nint GetStdHandle(int nStdHandle);
    }
}