SafeRegistryHandle Constructor (IntPtr, Boolean)
.NET Framework (current version)
Initializes a new instance of the SafeRegistryHandle class.
Assembly: mscorlib (in mscorlib.dll)
public: [SecurityCriticalAttribute] SafeRegistryHandle( IntPtr preexistingHandle, bool ownsHandle )
Parameters
- preexistingHandle
-
Type:
System::IntPtr
An object that represents the pre-existing handle to use.
- ownsHandle
-
Type:
System::Boolean
true to reliably release the handle during the finalization phase; false to prevent reliable release.
Specifying false for ownsHandle is not recommended.
SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
.NET Framework
Available since 4.0
Available since 4.0
Show: