File: LibraryImports.g.cs
Project: src\src\Microsoft.DotNet.Build.Tasks.Feed\Microsoft.DotNet.Build.Tasks.Feed.csproj (Microsoft.DotNet.Build.Tasks.Feed)
// <auto-generated/>
namespace Microsoft.DotNet.Build.Tasks.Feed
{
    internal unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.12.42111")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial bool CreateHardLink(string newFileName, string exitingFileName, nint securityAttributes)
        {
            int __lastError;
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __exitingFileName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(exitingFileName))
            fixed (void* __newFileName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(newFileName))
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal_native = __PInvoke((ushort*)__newFileName_native, (ushort*)__exitingFileName_native, securityAttributes);
                __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 = "CreateHardLinkW", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __newFileName_native, ushort* __exitingFileName_native, nint __securityAttributes_native);
        }
    }
}
namespace Microsoft.DotNet.Build.Tasks.Feed
{
    internal unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.12.42111")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial int link(string oldpath, string newpath)
        {
            int __lastError;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __newpath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(newpath))
            fixed (void* __oldpath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(oldpath))
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke((ushort*)__oldpath_native, (ushort*)__newpath_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libc", EntryPoint = "link", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __oldpath_native, ushort* __newpath_native);
        }
    }
}