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