Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeRegistryHandle.cs
Go to the documentation of this file.
1
using
System
;
2
using
Microsoft.Win32.SafeHandles
;
3
4
namespace
Internal.Win32.SafeHandles
;
5
6
internal
sealed
class
SafeRegistryHandle
:
SafeHandleZeroOrMinusOneIsInvalid
7
{
8
public
SafeRegistryHandle
()
9
: base(ownsHandle: true)
10
{
11
}
12
13
public
SafeRegistryHandle
(
IntPtr
preexistingHandle,
bool
ownsHandle)
14
: base(ownsHandle)
15
{
16
SetHandle
(preexistingHandle);
17
}
18
19
protected
override
bool
ReleaseHandle
()
20
{
21
return
Interop
.
Advapi32
.
RegCloseKey
(
handle
) == 0;
22
}
23
}
Internal.Win32.SafeHandles.SafeRegistryHandle.ReleaseHandle
override bool ReleaseHandle()
Definition
SafeRegistryHandle.cs:19
Internal.Win32.SafeHandles.SafeRegistryHandle.SafeRegistryHandle
SafeRegistryHandle()
Definition
SafeRegistryHandle.cs:8
Internal.Win32.SafeHandles.SafeRegistryHandle.SafeRegistryHandle
SafeRegistryHandle(IntPtr preexistingHandle, bool ownsHandle)
Definition
SafeRegistryHandle.cs:13
Internal.Win32.SafeHandles.SafeRegistryHandle
Definition
SafeRegistryHandle.cs:7
Interop.Advapi32.RegCloseKey
static int RegCloseKey(IntPtr hKey)
Interop.Advapi32
Definition
Interop.cs:456
Interop
Definition
Interop.cs:6
Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
Definition
SafeHandleZeroOrMinusOneIsInvalid.cs:7
System.Runtime.InteropServices.SafeHandle.SetHandle
void SetHandle(IntPtr handle)
Definition
SafeHandle.cs:42
System.Runtime.InteropServices.SafeHandle.handle
IntPtr handle
Definition
SafeHandle.cs:8
Internal.Win32.SafeHandles
Definition
SafeRegistryHandle.cs:4
Microsoft.Win32.SafeHandles
Definition
SafeProcessHandle.cs:3
System
Definition
BlockingCollection.cs:8
System.IntPtr
Definition
IntPtr.cs:14
source
System.Private.CoreLib
Internal.Win32.SafeHandles
SafeRegistryHandle.cs
Generated by
1.10.0