Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeAccessTokenHandle.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Runtime.InteropServices
;
3
4
namespace
Microsoft.Win32.SafeHandles
;
5
6
public
sealed
class
SafeAccessTokenHandle
:
SafeHandle
7
{
8
public
static
SafeAccessTokenHandle
InvalidHandle
=>
new
SafeAccessTokenHandle
(
IntPtr
.
Zero
);
9
10
public
override
bool
IsInvalid
11
{
12
get
13
{
14
if
(!(
handle
==
IntPtr
.
Zero
))
15
{
16
return
handle
==
new
IntPtr
(-1);
17
}
18
return
true
;
19
}
20
}
21
22
public
SafeAccessTokenHandle
()
23
: base(
IntPtr
.Zero, ownsHandle: true)
24
{
25
}
26
27
public
SafeAccessTokenHandle
(
IntPtr
handle
)
28
: base(
handle
, ownsHandle: true)
29
{
30
}
31
32
protected
override
bool
ReleaseHandle
()
33
{
34
return
global::Interop.Kernel32.CloseHandle(
handle
);
35
}
36
}
Microsoft.Win32.SafeHandles.SafeAccessTokenHandle.ReleaseHandle
override bool ReleaseHandle()
Definition
SafeAccessTokenHandle.cs:32
Microsoft.Win32.SafeHandles.SafeAccessTokenHandle.SafeAccessTokenHandle
SafeAccessTokenHandle(IntPtr handle)
Definition
SafeAccessTokenHandle.cs:27
Microsoft.Win32.SafeHandles.SafeAccessTokenHandle.InvalidHandle
static SafeAccessTokenHandle InvalidHandle
Definition
SafeAccessTokenHandle.cs:8
Microsoft.Win32.SafeHandles.SafeAccessTokenHandle.IsInvalid
override bool IsInvalid
Definition
SafeAccessTokenHandle.cs:11
Microsoft.Win32.SafeHandles.SafeAccessTokenHandle.SafeAccessTokenHandle
SafeAccessTokenHandle()
Definition
SafeAccessTokenHandle.cs:22
Microsoft.Win32.SafeHandles.SafeAccessTokenHandle
Definition
SafeAccessTokenHandle.cs:7
System.Runtime.InteropServices.SafeHandle.handle
IntPtr handle
Definition
SafeHandle.cs:8
System.Runtime.InteropServices.SafeHandle
Definition
SafeHandle.cs:7
Microsoft.Win32.SafeHandles
Definition
SafeProcessHandle.cs:3
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System
Definition
BlockingCollection.cs:8
System.IntPtr.Zero
static readonly IntPtr Zero
Definition
IntPtr.cs:18
System.IntPtr
Definition
IntPtr.cs:14
source
System.Security.Principal.Windows
Microsoft.Win32.SafeHandles
SafeAccessTokenHandle.cs
Generated by
1.10.0