<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0-preview.4.20251.6" />

SafeAccessTokenHandle

public sealed class SafeAccessTokenHandle : SafeHandle
using System; using System.Runtime.InteropServices; using System.Security; namespace Microsoft.Win32.SafeHandles { [SecurityCritical] public sealed class SafeAccessTokenHandle : SafeHandle { public static SafeAccessTokenHandle InvalidHandle { [SecurityCritical] get { throw new PlatformNotSupportedException(); } } public override bool IsInvalid { [SecurityCritical] get { throw new PlatformNotSupportedException(); } } public SafeAccessTokenHandle(IntPtr handle) : base((IntPtr)0, false) { throw new PlatformNotSupportedException(); } [SecurityCritical] protected override bool ReleaseHandle() { throw new PlatformNotSupportedException(); } } }