Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Interop.GetUnixName.cs « System.Native « Unix « Interop « src « Common « libraries « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 276f1129112c136dedc34873bad3e4486dca1976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
    internal static partial class Sys
    {
        [GeneratedDllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetUnixName")]
        private static partial IntPtr GetUnixNamePrivate();

        internal static string GetUnixName()
        {
            IntPtr ptr = GetUnixNamePrivate();
            return Marshal.PtrToStringAnsi(ptr)!;
        }
    }
}