Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​Win32.​SafeHandles.​SafeAccessTokenHandle

Assembly: System.Security.Principal.Windows

Inheritance: object → System.​Runtime.​ConstrainedExecution.​CriticalFinalizerObjectSystem.​Runtime.​InteropServices.​SafeHandle → SafeAccessTokenHandle

Implemented Interfaces

Provides a safe handle to a Windows thread or process access token. For more information, see Access Tokens.

Fields and Constants

protected nint
handle

Properties

public static SafeAccessTokenHandle
InvalidHandle
Returns an invalid handle by instantiating a <see cref="T:Microsoft.Win32.SafeHandles.SafeAccessTokenHandle" /> object with <see cref="F:System.IntPtr.Zero" /> .
public bool
IsInvalid
Gets a value that indicates whether the handle is invalid.
public bool
IsClosed

Methods

protected bool
ReleaseHandle​()
public void
Close​()
public void
DangerousAddRef​(System.​Boolean& success)
public nint
DangerousGetHandle​()
public void
DangerousRelease​()
public void
Dispose​()
protected void
Dispose​(bool disposing)
protected void
Finalize​()
protected void
SetHandle​(nint handle)
public void
SetHandleAsInvalid​()
public bool
Equals​(object obj)
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object