Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeProcessHandle.cs
Go to the documentation of this file.
1
using
System
;
2
3
namespace
Microsoft.Win32.SafeHandles
;
4
5
public
sealed
class
SafeProcessHandle
:
SafeHandleZeroOrMinusOneIsInvalid
6
{
7
internal
static
readonly
SafeProcessHandle
InvalidHandle
=
new
SafeProcessHandle
();
8
9
public
SafeProcessHandle
()
10
: this(
IntPtr
.Zero)
11
{
12
}
13
14
internal
SafeProcessHandle
(
IntPtr
handle
)
15
: this(
handle
, ownsHandle: true)
16
{
17
}
18
19
public
SafeProcessHandle
(
IntPtr
existingHandle,
bool
ownsHandle)
20
: base(ownsHandle)
21
{
22
SetHandle
(existingHandle);
23
}
24
25
protected
override
bool
ReleaseHandle
()
26
{
27
return
global::Interop.Kernel32.CloseHandle(
handle
);
28
}
29
}
Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
Definition
SafeHandleZeroOrMinusOneIsInvalid.cs:7
Microsoft.Win32.SafeHandles.SafeProcessHandle.ReleaseHandle
override bool ReleaseHandle()
Definition
SafeProcessHandle.cs:25
Microsoft.Win32.SafeHandles.SafeProcessHandle.SafeProcessHandle
SafeProcessHandle(IntPtr existingHandle, bool ownsHandle)
Definition
SafeProcessHandle.cs:19
Microsoft.Win32.SafeHandles.SafeProcessHandle.InvalidHandle
static readonly SafeProcessHandle InvalidHandle
Definition
SafeProcessHandle.cs:7
Microsoft.Win32.SafeHandles.SafeProcessHandle.SafeProcessHandle
SafeProcessHandle()
Definition
SafeProcessHandle.cs:9
Microsoft.Win32.SafeHandles.SafeProcessHandle.SafeProcessHandle
SafeProcessHandle(IntPtr handle)
Definition
SafeProcessHandle.cs:14
Microsoft.Win32.SafeHandles.SafeProcessHandle
Definition
SafeProcessHandle.cs:6
System.Runtime.InteropServices.SafeHandle.SetHandle
void SetHandle(IntPtr handle)
Definition
SafeHandle.cs:42
System.Runtime.InteropServices.SafeHandle.handle
IntPtr handle
Definition
SafeHandle.cs:8
Microsoft.Win32.SafeHandles
Definition
SafeProcessHandle.cs:3
System
Definition
BlockingCollection.cs:8
System.IntPtr
Definition
IntPtr.cs:14
source
System.Diagnostics.Process
Microsoft.Win32.SafeHandles
SafeProcessHandle.cs
Generated by
1.10.0