Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeProcessHandle.cs
Go to the documentation of this file.
1using System;
2
4
6{
7 internal static readonly SafeProcessHandle InvalidHandle = new SafeProcessHandle();
8
10 : this(IntPtr.Zero)
11 {
12 }
13
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}
SafeProcessHandle(IntPtr existingHandle, bool ownsHandle)
static readonly SafeProcessHandle InvalidHandle