Windows-powershell / PowerShell-master /src /System.Management.Automation /engine /Interop /Windows /CreateJobObject.cs
Download PowerShell-master/src/System.Management.Automation/engine/Interop/Windows/CreateJobObject.cs from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 898 Bytes
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/src/System.Management.Automation/engine/Interop/Windows/CreateJobObject.cs
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/src/System.Management.Automation/engine/Interop/Windows/CreateJobObject.cs
-
curl -L -o CreateJobObject.cs https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/src/System.Management.Automation/engine/Interop/Windows/CreateJobObject.cs
898 Bytes
| // Copyright (c) Microsoft Corporation. | |
| // Licensed under the MIT License. | |
| using System.Runtime.InteropServices; | |
| internal static partial class Interop | |
| { | |
| internal static partial class Windows | |
| { | |
| internal sealed class SafeJobHandle : SafeHandle | |
| { | |
| public SafeJobHandle() : base(invalidHandleValue: nint.Zero, ownsHandle: true) { } | |
| public override bool IsInvalid => handle == nint.Zero; | |
| protected override bool ReleaseHandle() | |
| => Windows.CloseHandle(handle); | |
| } | |
| [] | |
| private static partial SafeJobHandle CreateJobObject( | |
| nint lpJobAttributes, | |
| nint lpName); | |
| internal static SafeJobHandle CreateJobObject() | |
| => CreateJobObject(nint.Zero, nint.Zero); | |
| } | |
| } | |