NamedPipeServerStream コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
NamedPipeServerStream クラスの新しいインスタンスを初期化します。
オーバーロード
NamedPipeServerStream(String)
指定したパイプ名を使用して、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName);
public NamedPipeServerStream(string pipeName);
new System.IO.Pipes.NamedPipeServerStream : string -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String)
パラメーター
- pipeName
- String
パイプの名前。
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName が "anonymous" に設定されています。
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
注釈
このコンストラクターは、次の特性を持つ NamedPipeServerStream オブジェクトを作成します。
InOutの既定のパイプ方向。
同じ名前を共有するサーバー インスタンスの最大数を 1 に設定します。
既定の入力バッファー サイズと出力バッファー サイズ。
パイプセキュリティなし。
追加の PipeAccessRightsは指定されません。
適用対象
NamedPipeServerStream(String, PipeDirection, Int32, PipeTransmissionMode, PipeOptions, Int32, Int32, PipeSecurity, HandleInheritability)
NamedPipeServerStream クラスの新しいインスタンスを、指定したパイプ名、パイプの方向、サーバー インスタンスの最大数、伝送モード、パイプ オプション、推奨されるバッファー サイズ、パイプ セキュリティ、継承モードを使用して初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName, System::IO::Pipes::PipeDirection direction, int maxNumberOfServerInstances, System::IO::Pipes::PipeTransmissionMode transmissionMode, System::IO::Pipes::PipeOptions options, int inBufferSize, int outBufferSize, System::IO::Pipes::PipeSecurity ^ pipeSecurity, System::IO::HandleInheritability inheritability);
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode, System.IO.Pipes.PipeOptions options, int inBufferSize, int outBufferSize, System.IO.Pipes.PipeSecurity pipeSecurity, System.IO.HandleInheritability inheritability);
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection * int * System.IO.Pipes.PipeTransmissionMode * System.IO.Pipes.PipeOptions * int * int * System.IO.Pipes.PipeSecurity * System.IO.HandleInheritability -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String, direction As PipeDirection, maxNumberOfServerInstances As Integer, transmissionMode As PipeTransmissionMode, options As PipeOptions, inBufferSize As Integer, outBufferSize As Integer, pipeSecurity As PipeSecurity, inheritability As HandleInheritability)
パラメーター
- pipeName
- String
パイプの名前。
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
- maxNumberOfServerInstances
- Int32
同じ名前を共有するサーバー インスタンスの最大数。 この値の MaxAllowedServerInstances を渡すことができます。
- transmissionMode
- PipeTransmissionMode
パイプの伝送モードを決定する列挙値の 1 つ。
- options
- PipeOptions
パイプを開くか作成する方法を決定する列挙値の 1 つ。
- inBufferSize
- Int32
入力バッファー サイズを示す 0 より大きい正の値。
- outBufferSize
- Int32
出力バッファー サイズを示す 0 より大きい正の値。
- pipeSecurity
- PipeSecurity
パイプのアクセス制御と監査セキュリティを決定するオブジェクト。
- inheritability
- HandleInheritability
基になるハンドルを子プロセスによって継承できるかどうかを決定する列挙値の 1 つ。
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName が "anonymous" に設定されています。
-又は-
direction が有効な PipeDirection 値ではありません。
-又は-
maxNumberOfServerInstances が -1 より小さいか、254 より大きい (-1 は MaxAllowedServerInstancesを示します)
-又は-
options が有効な PipeOptions 値ではありません。
-又は-
inBufferSize が負の値です。
-又は-
inheritability が有効な HandleInheritability 値ではありません。
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
注釈
このコンストラクターは、追加のNamedPipeServerStreamが指定されていないPipeAccessRights オブジェクトを作成します。
適用対象
NamedPipeServerStream(String, PipeDirection, Int32, PipeTransmissionMode, PipeOptions, Int32, Int32, PipeSecurity)
指定したパイプ名、パイプの方向、サーバー インスタンスの最大数、伝送モード、パイプ オプション、推奨されるイン/アウト バッファー サイズ、およびパイプ セキュリティを使用して、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName, System::IO::Pipes::PipeDirection direction, int maxNumberOfServerInstances, System::IO::Pipes::PipeTransmissionMode transmissionMode, System::IO::Pipes::PipeOptions options, int inBufferSize, int outBufferSize, System::IO::Pipes::PipeSecurity ^ pipeSecurity);
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode, System.IO.Pipes.PipeOptions options, int inBufferSize, int outBufferSize, System.IO.Pipes.PipeSecurity pipeSecurity);
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection * int * System.IO.Pipes.PipeTransmissionMode * System.IO.Pipes.PipeOptions * int * int * System.IO.Pipes.PipeSecurity -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String, direction As PipeDirection, maxNumberOfServerInstances As Integer, transmissionMode As PipeTransmissionMode, options As PipeOptions, inBufferSize As Integer, outBufferSize As Integer, pipeSecurity As PipeSecurity)
パラメーター
- pipeName
- String
パイプの名前。
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
- maxNumberOfServerInstances
- Int32
同じ名前を共有するサーバー インスタンスの最大数。 この値の MaxAllowedServerInstances を渡すことができます。
- transmissionMode
- PipeTransmissionMode
パイプの伝送モードを決定する列挙値の 1 つ。
- options
- PipeOptions
パイプを開くか作成する方法を決定する列挙値の 1 つ。
- inBufferSize
- Int32
入力バッファー サイズを示す 0 より大きい正の値。
- outBufferSize
- Int32
出力バッファー サイズを示す 0 より大きい正の値。
- pipeSecurity
- PipeSecurity
パイプのアクセス制御と監査セキュリティを決定するオブジェクト。
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName が "anonymous" に設定されています。
-又は-
direction が有効な PipeDirection 値ではありません。
-又は-
maxNumberOfServerInstances が -1 より小さいか、254 より大きい (-1 は MaxAllowedServerInstancesを示します)
-又は-
options が有効な PipeOptions 値ではありません。
-又は-
inBufferSize が負の値です。
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
注釈
このコンストラクターは、次の特性を持つ NamedPipeServerStream オブジェクトを作成します。
- HandleInheritabilityの既定のNone値。
- 追加の PipeAccessRightsは指定されません。
適用対象
NamedPipeServerStream(String, PipeDirection, Int32, PipeTransmissionMode, PipeOptions, Int32, Int32)
指定したパイプ名、パイプの方向、サーバー インスタンスの最大数、伝送モード、パイプ オプション、および推奨されるイン/アウト バッファー サイズを使用して、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName, System::IO::Pipes::PipeDirection direction, int maxNumberOfServerInstances, System::IO::Pipes::PipeTransmissionMode transmissionMode, System::IO::Pipes::PipeOptions options, int inBufferSize, int outBufferSize);
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode, System.IO.Pipes.PipeOptions options, int inBufferSize, int outBufferSize);
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection * int * System.IO.Pipes.PipeTransmissionMode * System.IO.Pipes.PipeOptions * int * int -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String, direction As PipeDirection, maxNumberOfServerInstances As Integer, transmissionMode As PipeTransmissionMode, options As PipeOptions, inBufferSize As Integer, outBufferSize As Integer)
パラメーター
- pipeName
- String
パイプの名前。
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
- maxNumberOfServerInstances
- Int32
同じ名前を共有するサーバー インスタンスの最大数。 この値の MaxAllowedServerInstances を渡すことができます。
- transmissionMode
- PipeTransmissionMode
パイプの伝送モードを決定する列挙値の 1 つ。
- options
- PipeOptions
パイプを開くか作成する方法を決定する列挙値の 1 つ。
- inBufferSize
- Int32
入力バッファー サイズを示す 0 より大きい正の値。
- outBufferSize
- Int32
出力バッファー サイズを示す 0 より大きい正の値。
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName が "anonymous" に設定されています。
-又は-
direction が有効な PipeDirection 値ではありません。
-又は-
maxNumberOfServerInstances が -1 より小さいか、254 より大きい (-1 は MaxAllowedServerInstancesを示します)
-又は-
options が有効な PipeOptions 値ではありません。
-又は-
inBufferSize が負の値です。
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
注釈
このコンストラクターは、次の特性を持つ NamedPipeServerStream オブジェクトを作成します。
- 追加のパイプ セキュリティはありません。
- HandleInheritabilityの既定のNone値。
- 追加の PipeAccessRightsは指定されません。
適用対象
NamedPipeServerStream(String, PipeDirection, Int32, PipeTransmissionMode, PipeOptions)
指定したパイプ名、パイプの方向、サーバー インスタンスの最大数、伝送モード、およびパイプ オプションを使用して、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName, System::IO::Pipes::PipeDirection direction, int maxNumberOfServerInstances, System::IO::Pipes::PipeTransmissionMode transmissionMode, System::IO::Pipes::PipeOptions options);
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode, System.IO.Pipes.PipeOptions options);
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection * int * System.IO.Pipes.PipeTransmissionMode * System.IO.Pipes.PipeOptions -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String, direction As PipeDirection, maxNumberOfServerInstances As Integer, transmissionMode As PipeTransmissionMode, options As PipeOptions)
パラメーター
- pipeName
- String
パイプの名前。
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
- maxNumberOfServerInstances
- Int32
同じ名前を共有するサーバー インスタンスの最大数。 この値の MaxAllowedServerInstances を渡すことができます。
- transmissionMode
- PipeTransmissionMode
パイプの伝送モードを決定する列挙値の 1 つ。
- options
- PipeOptions
パイプを開くか作成する方法を決定する列挙値の 1 つ。
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName が "anonymous" に設定されています。
-又は-
direction が有効な PipeDirection 値ではありません。
-又は-
maxNumberOfServerInstances が -1 より小さいか、254 より大きい (-1 は MaxAllowedServerInstancesを示します)
-又は-
options が有効な PipeOptions 値ではありません。
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
注釈
このコンストラクターは、次の特性を持つ NamedPipeServerStream オブジェクトを作成します。
- 既定の入力バッファー サイズと出力バッファー サイズ。
- パイプセキュリティなし。
- HandleInheritabilityのNone値。
- 追加の PipeAccessRightsは指定されません。
適用対象
NamedPipeServerStream(String, PipeDirection, Int32, PipeTransmissionMode, PipeOptions, Int32, Int32, PipeSecurity, HandleInheritability, PipeAccessRights)
指定したパイプ名、パイプの方向、サーバー インスタンスの最大数、伝送モード、パイプ オプション、推奨されるバッファー サイズ、パイプ セキュリティ、継承モード、パイプ アクセス権を使用して、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName, System::IO::Pipes::PipeDirection direction, int maxNumberOfServerInstances, System::IO::Pipes::PipeTransmissionMode transmissionMode, System::IO::Pipes::PipeOptions options, int inBufferSize, int outBufferSize, System::IO::Pipes::PipeSecurity ^ pipeSecurity, System::IO::HandleInheritability inheritability, System::IO::Pipes::PipeAccessRights additionalAccessRights);
[System.Security.SecurityCritical]
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode, System.IO.Pipes.PipeOptions options, int inBufferSize, int outBufferSize, System.IO.Pipes.PipeSecurity pipeSecurity, System.IO.HandleInheritability inheritability, System.IO.Pipes.PipeAccessRights additionalAccessRights);
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode, System.IO.Pipes.PipeOptions options, int inBufferSize, int outBufferSize, System.IO.Pipes.PipeSecurity pipeSecurity, System.IO.HandleInheritability inheritability, System.IO.Pipes.PipeAccessRights additionalAccessRights);
[<System.Security.SecurityCritical>]
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection * int * System.IO.Pipes.PipeTransmissionMode * System.IO.Pipes.PipeOptions * int * int * System.IO.Pipes.PipeSecurity * System.IO.HandleInheritability * System.IO.Pipes.PipeAccessRights -> System.IO.Pipes.NamedPipeServerStream
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection * int * System.IO.Pipes.PipeTransmissionMode * System.IO.Pipes.PipeOptions * int * int * System.IO.Pipes.PipeSecurity * System.IO.HandleInheritability * System.IO.Pipes.PipeAccessRights -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String, direction As PipeDirection, maxNumberOfServerInstances As Integer, transmissionMode As PipeTransmissionMode, options As PipeOptions, inBufferSize As Integer, outBufferSize As Integer, pipeSecurity As PipeSecurity, inheritability As HandleInheritability, additionalAccessRights As PipeAccessRights)
パラメーター
- pipeName
- String
パイプの名前。
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
- maxNumberOfServerInstances
- Int32
同じ名前を共有するサーバー インスタンスの最大数。 この値の MaxAllowedServerInstances を渡すことができます。
- transmissionMode
- PipeTransmissionMode
パイプの伝送モードを決定する列挙値の 1 つ。
- options
- PipeOptions
パイプを開くか作成する方法を決定する列挙値の 1 つ。
- inBufferSize
- Int32
入力バッファー のサイズ。
- outBufferSize
- Int32
出力バッファー サイズ。
- pipeSecurity
- PipeSecurity
パイプのアクセス制御と監査セキュリティを決定するオブジェクト。
- inheritability
- HandleInheritability
基になるハンドルを子プロセスによって継承できるかどうかを決定する列挙値の 1 つ。
- additionalAccessRights
- PipeAccessRights
パイプのアクセス権を指定する列挙値の 1 つ。
- 属性
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName が "anonymous" に設定されています。
-又は-
direction が有効な PipeDirection 値ではありません。
-又は-
maxNumberOfServerInstances が -1 より小さいか、254 より大きい (-1 は MaxAllowedServerInstancesを示します)
-又は-
options が有効な PipeOptions 値ではありません。
-又は-
inBufferSize が負の値です。
-又は-
inheritability が有効な HandleInheritability 値ではありません。
-又は-
additionalAccessRights が有効な PipeAccessRights 値ではありません。
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
適用対象
NamedPipeServerStream(PipeDirection, Boolean, Boolean, SafePipeHandle)
指定したパイプ ハンドルから、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::IO::Pipes::PipeDirection direction, bool isAsync, bool isConnected, Microsoft::Win32::SafeHandles::SafePipeHandle ^ safePipeHandle);
public NamedPipeServerStream(System.IO.Pipes.PipeDirection direction, bool isAsync, bool isConnected, Microsoft.Win32.SafeHandles.SafePipeHandle safePipeHandle);
[System.Security.SecurityCritical]
public NamedPipeServerStream(System.IO.Pipes.PipeDirection direction, bool isAsync, bool isConnected, Microsoft.Win32.SafeHandles.SafePipeHandle safePipeHandle);
new System.IO.Pipes.NamedPipeServerStream : System.IO.Pipes.PipeDirection * bool * bool * Microsoft.Win32.SafeHandles.SafePipeHandle -> System.IO.Pipes.NamedPipeServerStream
[<System.Security.SecurityCritical>]
new System.IO.Pipes.NamedPipeServerStream : System.IO.Pipes.PipeDirection * bool * bool * Microsoft.Win32.SafeHandles.SafePipeHandle -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (direction As PipeDirection, isAsync As Boolean, isConnected As Boolean, safePipeHandle As SafePipeHandle)
パラメーター
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
- isAsync
- Boolean
true ハンドルが非同期的に開かれたことを示す場合。それ以外の場合は false。
- isConnected
- Boolean
true パイプが接続されていることを示す場合。それ以外の場合は false。
- safePipeHandle
- SafePipeHandle
この NamedPipeServerStream オブジェクトがカプセル化するパイプの安全なハンドル。
- 属性
例外
direction が有効な PipeDirection 値ではありません。
safePipeHandle は nullです。
safePipeHandle は無効なハンドルです。
適用対象
NamedPipeServerStream(String, PipeDirection, Int32)
指定したパイプ名、パイプの方向、およびサーバー インスタンスの最大数を使用して、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName, System::IO::Pipes::PipeDirection direction, int maxNumberOfServerInstances);
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances);
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection * int -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String, direction As PipeDirection, maxNumberOfServerInstances As Integer)
パラメーター
- pipeName
- String
パイプの名前。
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
- maxNumberOfServerInstances
- Int32
同じ名前を共有するサーバー インスタンスの最大数。 この値の MaxAllowedServerInstances を渡すことができます。
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName が "anonymous" に設定されています。
-又は-
direction が有効な PipeDirection 値ではありません。
-又は-
負以外の数値が必要です。
-又は-
maxNumberOfServerInstances が -1 より小さいか、254 より大きい (-1 は MaxAllowedServerInstancesを示します)
-又は-
None または Inheritable が必須です。
-又は-
アクセス権は、 ChangePermissions 、 TakeOwnership 、および AccessSystemSecurity フラグに制限されます。
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
注釈
このコンストラクターは、次の特性を持つ NamedPipeServerStream オブジェクトを作成します。
- 同じ名前を共有するサーバー インスタンスの最大数の既定値は 1 です。
- PipeTransmissionModeの既定のByte値。
- PipeOptionsのNone値。
- 既定の入力バッファー サイズと出力バッファー サイズ。
- パイプセキュリティなし。
- HandleInheritabilityのNone値。
- 追加の PipeAccessRightsは指定されません。
適用対象
NamedPipeServerStream(String, PipeDirection)
指定したパイプ名とパイプの方向を使用して、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName, System::IO::Pipes::PipeDirection direction);
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction);
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String, direction As PipeDirection)
パラメーター
- pipeName
- String
パイプの名前。
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
例
次の例は、名前付きパイプを使用して親プロセスから子プロセスに文字列を送信するメソッドを示しています。 次の使用例は、親プロセスで NamedPipeServerStream オブジェクトを作成します。 NamedPipeServerStream オブジェクトには PipeDirection のOut値があり、NamedPipeClientStream オブジェクトが現在のNamedPipeServerStream オブジェクトへの接続を確立するまでブロックします。
using System;
using System.IO;
using System.IO.Pipes;
class PipeServer
{
static void Main()
{
using (NamedPipeServerStream pipeServer =
new NamedPipeServerStream("testpipe", PipeDirection.Out))
{
Console.WriteLine("NamedPipeServerStream object created.");
// Wait for a client to connect
Console.Write("Waiting for client connection...");
pipeServer.WaitForConnection();
Console.WriteLine("Client connected.");
try
{
// Read user input and send that to the client process.
using (StreamWriter sw = new StreamWriter(pipeServer))
{
sw.AutoFlush = true;
Console.Write("Enter text: ");
sw.WriteLine(Console.ReadLine());
}
}
// Catch the IOException that is raised if the pipe is broken
// or disconnected.
catch (IOException e)
{
Console.WriteLine("ERROR: {0}", e.Message);
}
}
}
}
Imports System.IO
Imports System.IO.Pipes
Class PipeServer
Shared Sub Main()
Dim pipeServer As New NamedPipeServerStream("testpipe", PipeDirection.Out)
Console.WriteLine("NamedPipeServerStream object created.")
' Wait for a client to connect
Console.Write("Waiting for a client connection...")
pipeServer.WaitForConnection()
Console.WriteLine("Client connected.")
Try
'Read user input and send that to the client process.
Dim sw As New StreamWriter(pipeServer)
sw.AutoFlush = True
Console.Write("Enter Text: ")
sw.WriteLine(Console.ReadLine())
Catch ex As IOException
' Catch the IOException that is raised if the pipe is broken
' or disconnected
Console.WriteLine("ERROR: {0}", ex.Message)
End Try
End Sub
End Class
注釈
このコンストラクターは、次の特性を持つ NamedPipeServerStream オブジェクトを作成します。
既定の入力バッファー サイズと出力バッファー サイズ。
パイプセキュリティなし。
追加の PipeAccessRightsは指定されません。
適用対象
NamedPipeServerStream(String, PipeDirection, Int32, PipeTransmissionMode)
指定したパイプ名、パイプの方向、サーバー インスタンスの最大数、および送信モードを使用して、 NamedPipeServerStream クラスの新しいインスタンスを初期化します。
public:
NamedPipeServerStream(System::String ^ pipeName, System::IO::Pipes::PipeDirection direction, int maxNumberOfServerInstances, System::IO::Pipes::PipeTransmissionMode transmissionMode);
public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode);
new System.IO.Pipes.NamedPipeServerStream : string * System.IO.Pipes.PipeDirection * int * System.IO.Pipes.PipeTransmissionMode -> System.IO.Pipes.NamedPipeServerStream
Public Sub New (pipeName As String, direction As PipeDirection, maxNumberOfServerInstances As Integer, transmissionMode As PipeTransmissionMode)
パラメーター
- pipeName
- String
パイプの名前。
- direction
- PipeDirection
パイプの方向を決定する列挙値の 1 つ。
- maxNumberOfServerInstances
- Int32
同じ名前を共有するサーバー インスタンスの最大数。 この値の MaxAllowedServerInstances を渡すことができます。
- transmissionMode
- PipeTransmissionMode
パイプの伝送モードを決定する列挙値の 1 つ。
例外
pipeName は nullです。
pipeName は長さ 0 の文字列です。
pipeName が "anonymous" に設定されています。
-又は-
direction が有効な PipeDirection 値ではありません。
-又は-
maxNumberOfServerInstances が -1 より小さいか、254 より大きい (-1 は MaxAllowedServerInstancesを示します)
pipeName にはコロン (":") が含まれています。
サーバー インスタンスの最大数を超えました。
注釈
このコンストラクターは、次の特性を持つ NamedPipeServerStream オブジェクトを作成します。
- PipeOptionsの既定のNone値。
- 既定の入力バッファー サイズと出力バッファー サイズ。
- パイプセキュリティなし。
- HandleInheritabilityのNone値。
- 追加の PipeAccessRightsは指定されません。