PipeStream.InitializeHandle(SafePipeHandle, Boolean, Boolean) 方法
定义
从指定的 PipeStream 对象中初始化 SafePipeHandle 对象。Initializes a PipeStream object from the specified SafePipeHandle object.
protected:
void InitializeHandle(Microsoft::Win32::SafeHandles::SafePipeHandle ^ handle, bool isExposed, bool isAsync);
protected void InitializeHandle (Microsoft.Win32.SafeHandles.SafePipeHandle? handle, bool isExposed, bool isAsync);
protected void InitializeHandle (Microsoft.Win32.SafeHandles.SafePipeHandle handle, bool isExposed, bool isAsync);
[System.Security.SecurityCritical]
protected void InitializeHandle (Microsoft.Win32.SafeHandles.SafePipeHandle handle, bool isExposed, bool isAsync);
member this.InitializeHandle : Microsoft.Win32.SafeHandles.SafePipeHandle * bool * bool -> unit
[<System.Security.SecurityCritical>]
member this.InitializeHandle : Microsoft.Win32.SafeHandles.SafePipeHandle * bool * bool -> unit
Protected Sub InitializeHandle (handle As SafePipeHandle, isExposed As Boolean, isAsync As Boolean)
参数
- handle
- SafePipeHandle
要初始化的管道的 SafePipeHandle 对象。The SafePipeHandle object of the pipe to initialize.
- isExposed
- Boolean
要公开句柄,则为 true;否则为 false。true to expose the handle; otherwise, false.
- isAsync
- Boolean
true 指示句柄已异步打开;否则为 false。true to indicate that the handle was opened asynchronously; otherwise, false.
- 属性
例外
句柄无法绑定到管道中。A handle cannot be bound to the pipe.
注解
如果管道处于连接状态,则此方法还将 IsConnected 属性设置为 true 。If the pipe is in a connected state, this method also sets the IsConnected property to true.