SafeAccessTokenHandle
Provides a safe handle to a Windows thread or process access token. For more information, see Access Tokens.
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Microsoft.Win32.SafeHandles
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class SafeAccessTokenHandle : SafeHandle
{
public static SafeAccessTokenHandle InvalidHandle {
get {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public override bool IsInvalid {
get {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
public SafeAccessTokenHandle(IntPtr handle)
: base((IntPtr)0, false)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
protected override bool ReleaseHandle()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal);
}
}
}