SafeRegistryHandle Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SafeRegistryHandle() |
Creates a SafeRegistryHandle. |
SafeRegistryHandle(IntPtr, Boolean) |
Initializes a new instance of the SafeRegistryHandle class. |
SafeRegistryHandle()
- Source:
- SafeRegistryHandle.cs
Creates a SafeRegistryHandle.
public:
SafeRegistryHandle();
public SafeRegistryHandle ();
Public Sub New ()
Applies to
SafeRegistryHandle(IntPtr, Boolean)
- Source:
- SafeRegistryHandle.cs
Initializes a new instance of the SafeRegistryHandle class.
public:
SafeRegistryHandle(IntPtr preexistingHandle, bool ownsHandle);
public SafeRegistryHandle (IntPtr preexistingHandle, bool ownsHandle);
[System.Security.SecurityCritical]
public SafeRegistryHandle (IntPtr preexistingHandle, bool ownsHandle);
new Microsoft.Win32.SafeHandles.SafeRegistryHandle : nativeint * bool -> Microsoft.Win32.SafeHandles.SafeRegistryHandle
[<System.Security.SecurityCritical>]
new Microsoft.Win32.SafeHandles.SafeRegistryHandle : nativeint * bool -> Microsoft.Win32.SafeHandles.SafeRegistryHandle
Public Sub New (preexistingHandle As IntPtr, ownsHandle As Boolean)
Parameters
- preexistingHandle
-
IntPtr
nativeint
An object that represents the pre-existing handle to use.
- ownsHandle
- Boolean
true
to reliably release the handle during the finalization phase; false
to prevent reliable release.
- Attributes
Remarks
Specifying false
for ownsHandle
is not recommended.