AnonymousPipeServerStreamAcl.Create 方法

定义

使用指定的管道方向、继承模式、缓冲区大小和管道安全性创建 AnonymousPipeServerStream 类的新实例。

public:
 static System::IO::Pipes::AnonymousPipeServerStream ^ Create(System::IO::Pipes::PipeDirection direction, System::IO::HandleInheritability inheritability, int bufferSize, System::IO::Pipes::PipeSecurity ^ pipeSecurity);
public static System.IO.Pipes.AnonymousPipeServerStream Create (System.IO.Pipes.PipeDirection direction, System.IO.HandleInheritability inheritability, int bufferSize, System.IO.Pipes.PipeSecurity? pipeSecurity);
static member Create : System.IO.Pipes.PipeDirection * System.IO.HandleInheritability * int * System.IO.Pipes.PipeSecurity -> System.IO.Pipes.AnonymousPipeServerStream
Public Shared Function Create (direction As PipeDirection, inheritability As HandleInheritability, bufferSize As Integer, pipeSecurity As PipeSecurity) As AnonymousPipeServerStream

参数

direction
PipeDirection

确定管道方向的枚举值之一。 匿名管道是单向的,因此,方向不能设置为 InOut

inheritability
HandleInheritability

确定基础句柄能否由子进程继承的枚举值之一。

bufferSize
Int32

缓冲区的大小。 此值必须大于等于 0。

pipeSecurity
PipeSecurity

一个对象,确定管道的访问控制和审核安全性。

返回

新的匿名管道服务器流实例。

例外

directionInOut

inheritability 未设置为有效的 HandleInheritability 枚举值。

bufferSize 小于 0。

注解

将 设置为 pipeSecuritynull 等效于直接调用 AnonymousPipeServerStream(PipeDirection, HandleInheritability, Int32) 构造函数。

适用于