Language

ProcessStartInfo.StandardOutputHandle プロパティ

定義

子プロセスの標準出力として使用する SafeFileHandle を取得または設定します。

public:
 property Microsoft::Win32::SafeHandles::SafeFileHandle ^ StandardOutputHandle { Microsoft::Win32::SafeHandles::SafeFileHandle ^ get(); void set(Microsoft::Win32::SafeHandles::SafeFileHandle ^ value); };
public Microsoft.Win32.SafeHandles.SafeFileHandle? StandardOutputHandle { get; set; }
member this.StandardOutputHandle : Microsoft.Win32.SafeHandles.SafeFileHandle with get, set
Public Property StandardOutputHandle As SafeFileHandle

プロパティ値

子プロセスの標準出力ハンドルとして使用する SafeFileHandle 、または既定の動作を使用する null 。

注釈

ハンドルは継承可能である必要はありません。ランタイムは、必要に応じて継承可能として複製します。

CreateAnonymousPipeを使用して、接続されたパイプ ハンドルのペアを作成したり、ファイル ハンドルを開いたり、出力を破棄OpenNullHandleOpenHandleしたり、親の標準出力を継承するOpenStandardOutputHandleを作成したりします。

このプロパティが null され、 RedirectStandardOutput が falseされると、通常、プロセスは親の標準出力を継承します。 ただし、 StartDetached が true されている場合、またはプロセスが StartAndForget(ProcessStartInfo)で開始された場合、標準出力は代わりに null デバイスにリダイレクトされます。

プロセスを開始した直後にハンドルを破棄することをお勧めします。

このプロパティが nullされていない場合は、 RedirectStandardOutput と UseShellExecute の両方を falseする必要があります。

適用対象