AnonymousPipeServerStream Constructor (PipeDirection, SafePipeHandle^, SafePipeHandle^)

 

Initializes a new instance of the AnonymousPipeServerStream class from the specified pipe handles.

Namespace:   System.IO.Pipes
Assembly:  System.Core (in System.Core.dll)

public:
AnonymousPipeServerStream(
	PipeDirection direction,
	SafePipeHandle^ serverSafePipeHandle,
	SafePipeHandle^ clientSafePipeHandle
)

Parameters

direction
Type: System.IO.Pipes::PipeDirection

One of the enumeration values that determines the direction of the pipe.

Anonymous pipes can only be in one direction, so direction cannot be set to InOut.

serverSafePipeHandle
Type: Microsoft.Win32.SafeHandles::SafePipeHandle^

A safe handle for the pipe that this AnonymousPipeServerStream object will encapsulate.

clientSafePipeHandle
Type: Microsoft.Win32.SafeHandles::SafePipeHandle^

A safe handle for the AnonymousPipeClientStream object.

Exception Condition
ArgumentException

serverSafePipeHandle or clientSafePipeHandle is an invalid handle.

ArgumentNullException

serverSafePipeHandle or clientSafePipeHandle is null.

NotSupportedException

direction is set to InOut.

IOException

An I/O error, such as a disk error, has occurred.

-or-

The stream has been closed.

A PipeDirection value of InOut is not supported because anonymous pipes are defined to be one-way.

Demand

for full trust for the immediate caller. This member cannot be used by partially trusted code.

.NET Framework
Available since 3.5
Return to top
Show: