/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/System.Management.Automation/engine/Interop/Windows/CreateSymbolicLink.cs
25 строк
751 B
Aditya Patwardhan
Set `SetLastError` to `true` for symbolic and hard link native APIs (#19566)
01 май 2023, 20:56
Не верифицирован
01 май 2023, 20:56
72c81b8
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #nullable enable using System; using System.Runtime.InteropServices; internal static partial class Interop { internal static unsafe partial class Windows { [Flags] internal enum SymbolicLinkFlags { File = 0, Directory = 1, AllowUnprivilegedCreate = 2, } [LibraryImport("api-ms-win-core-file-l2-1-0.dll", EntryPoint = "CreateSymbolicLinkW", StringMarshalling = StringMarshalling.Utf16, SetLastError = true)] [return: MarshalAs(UnmanagedType.I1)] internal static partial bool CreateSymbolicLink(string name, string destination, SymbolicLinkFlags symbolicLinkFlags); } }