NamedPipeClientStream Constructor (String^, String^, PipeDirection)
Initializes a new instance of the NamedPipeClientStream class with the specified pipe and server names, and the specified pipe direction.
Assembly: System.Core (in System.Core.dll)
public:
NamedPipeClientStream(
String^ serverName,
String^ pipeName,
PipeDirection direction
)
Parameters
- serverName
-
Type:
System::String^
The name of the remote computer to connect to, or "." to specify the local computer.
- pipeName
-
Type:
System::String^
The name of the pipe.
- direction
-
Type:
System.IO.Pipes::PipeDirection
One of the enumeration values that determines the direction of the pipe.
| Exception | Condition |
|---|---|
| ArgumentNullException | pipeName or serverName is null. |
| ArgumentException | pipeName or serverName is a zero-length string. |
| ArgumentOutOfRangeException |
This constructor uses the following default values:
A default PipeOptions value of None.
A default TokenImpersonationLevel value of None.
A default HandleInheritability value of None.
The following example demonstrates a method to send a string from a parent process to a child process using named pipes. This example creates a NamedPipeClientStream object in a child process, which then connects to a pipe on the local computer. The server example can be seen in the NamedPipeServerStream class. This example is part of a larger example provided for the NamedPipeServerStream and NamedPipeClientStream classes.
for full trust for the immediate caller. This member cannot be used by partially trusted code.
Available since 3.5