Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeNCryptHandle.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
class
SafeNCryptHandle
:
SafeHandle
7
{
8
public
override
bool
IsInvalid
=>
handle
==
IntPtr
.
Zero
;
9
10
public
SafeNCryptHandle
()
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;
19
handle
=
IntPtr
.
Zero
;
20
return
result;
21
}
22
}
Microsoft.Win32.SafeHandles.SafeNCryptHandle.SafeNCryptHandle
SafeNCryptHandle()
Definition
SafeNCryptHandle.cs:10
Microsoft.Win32.SafeHandles.SafeNCryptHandle.IsInvalid
override bool IsInvalid
Definition
SafeNCryptHandle.cs:8
Microsoft.Win32.SafeHandles.SafeNCryptHandle.ReleaseHandle
override bool ReleaseHandle()
Definition
SafeNCryptHandle.cs:15
Microsoft.Win32.SafeHandles.SafeNCryptHandle
Definition
SafeNCryptHandle.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.Cryptography.Algorithms
Microsoft.Win32.SafeHandles
SafeNCryptHandle.cs
Generated by
1.10.0