File: _generated\0\LibraryImports.g.cs
Web Access
Project: src\runtime\src\libraries\System.Diagnostics.FileVersionInfo\src\System.Diagnostics.FileVersionInfo.csproj (System.Diagnostics.FileVersionInfo)
// <auto-generated/>
internal static partial class Interop
{
    internal static partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPlatformToPal", ExactSpelling = true)]
        internal static extern partial global::Interop.Error ConvertErrorPlatformToPal(int platformErrno);
    }
}
internal static partial class Interop
{
    internal static partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPalToPlatform", ExactSpelling = true)]
        internal static extern partial int ConvertErrorPalToPlatform(global::Interop.Error error);
    }
}
internal static partial class Interop
{
    internal static partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_StrErrorR", ExactSpelling = true)]
        private static unsafe extern partial byte* StrErrorR(int platformErrno, byte* buffer, int bufferSize);
    }
}
internal static partial class Interop
{
    internal static partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.38206")]
        internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output)
        {
            unsafe
            {
                int __lastError;
                output = default;
                nint __fd_native = default;
                int __retVal = default;
                // Setup - Perform required setup.
                global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
                try
                {
                    // Marshal - Convert managed data to native data.
                    __fd_native__marshaller.FromManaged(fd);
                    // Pin - Pin data in preparation for calling the P/Invoke.
                    fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                    {
                        // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                        __fd_native = __fd_native__marshaller.ToUnmanaged();
                        global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                        __retVal = __PInvoke(__fd_native, __output_native);
                        __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                    }
                }
                finally
                {
                    // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                    __fd_native__marshaller.Free();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FStat", ExactSpelling = true)]
                static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native);
            }
        }
    }
}
internal static partial class Interop
{
    internal static partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.38206")]
        internal static partial int Stat(string path, out global::Interop.Sys.FileStatus output)
        {
            unsafe
            {
                int __lastError;
                output = default;
                byte* __path_native = default;
                int __retVal = default;
                // Setup - Perform required setup.
                scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
                try
                {
                    // Marshal - Convert managed data to native data.
                    __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                    // Pin - Pin data in preparation for calling the P/Invoke.
                    fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                    {
                        // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                        __path_native = __path_native__marshaller.ToUnmanaged();
                        global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                        __retVal = __PInvoke(__path_native, __output_native);
                        __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                    }
                }
                finally
                {
                    // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                    __path_native__marshaller.Free();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
                static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
            }
        }
    }
}
internal static partial class Interop
{
    internal static partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.38206")]
        internal static partial int LStat(string path, out global::Interop.Sys.FileStatus output)
        {
            unsafe
            {
                int __lastError;
                output = default;
                byte* __path_native = default;
                int __retVal = default;
                // Setup - Perform required setup.
                scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
                try
                {
                    // Marshal - Convert managed data to native data.
                    __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                    // Pin - Pin data in preparation for calling the P/Invoke.
                    fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                    {
                        // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                        __path_native = __path_native__marshaller.ToUnmanaged();
                        global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                        __retVal = __PInvoke(__path_native, __output_native);
                        __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                    }
                }
                finally
                {
                    // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                    __path_native__marshaller.Free();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
                static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
            }
        }
    }
}