SafePipeHandle(IntPtr, Boolean) 构造函数

定义

初始化 SafePipeHandle 类的新实例。Initializes a new instance of the SafePipeHandle class.

public:
 SafePipeHandle(IntPtr preexistingHandle, bool ownsHandle);
public SafePipeHandle (IntPtr preexistingHandle, bool ownsHandle);
new Microsoft.Win32.SafeHandles.SafePipeHandle : nativeint * bool -> Microsoft.Win32.SafeHandles.SafePipeHandle
Public Sub New (preexistingHandle As IntPtr, ownsHandle As Boolean)

参数

preexistingHandle
IntPtr

IntPtr 对象,表示要使用的预先存在的句柄。An IntPtr object that represents the pre-existing handle to use.

ownsHandle
Boolean

若要在终止阶段可靠地释放此句柄,则为 true;若要阻止可靠释放(不建议使用),则为 falsetrue to reliably release the handle during the finalization phase; false to prevent reliable release (not recommended).

安全性

SecurityPermission
用于调用非托管代码的权限。for permission to call unmanaged code. 需求值: LinkDemandDemand value: LinkDemand. 关联的枚举:UnmanagedCodeAssociated enumeration: UnmanagedCode

适用于