Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeNCryptHandle.cs
Go to the documentation of this file.
1using System;
3
5
7{
8 public override bool IsInvalid => handle == IntPtr.Zero;
9
11 : base(IntPtr.Zero, ownsHandle: true)
12 {
13 }
14
15 protected override bool ReleaseHandle()
16 {
17 global::Interop.NCrypt.ErrorCode errorCode = global::Interop.NCrypt.NCryptFreeObject(handle);
18 bool result = errorCode == global::Interop.NCrypt.ErrorCode.ERROR_SUCCESS;
20 return result;
21 }
22}
static readonly IntPtr Zero
Definition IntPtr.cs:18