SafeRegistryHandle 构造函数

定义

重载

SafeRegistryHandle()

创建一个 SafeRegistryHandle

SafeRegistryHandle(IntPtr, Boolean)

初始化 SafeRegistryHandle 类的新实例。

SafeRegistryHandle()

Source:
SafeRegistryHandle.cs

创建一个 SafeRegistryHandle

public:
 SafeRegistryHandle();
public SafeRegistryHandle ();
Public Sub New ()

适用于

SafeRegistryHandle(IntPtr, Boolean)

Source:
SafeRegistryHandle.cs

初始化 SafeRegistryHandle 类的新实例。

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)

参数

preexistingHandle
IntPtr

nativeint

一个对象,它表示要使用的预先存在的句柄的。

ownsHandle
Boolean

若要在终止阶段可靠地释放此句柄,则为 true;若要阻止可靠释放,则为 false

属性

注解

false不建议为 ownsHandle 指定 。

适用于