語言

ProcessStartInfo.StandardOutputHandle 屬性

定義

取得或設定 a 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 A 作為子程序的標準輸出代言碼,或null使用預設行為。

備註

把手不一定要是可繼承的;執行時會將該位址複製為可繼承的。

可建立 CreateAnonymousPipe 一對連接的管線柄、 OpenHandle 開啟檔案柄、 OpenNullHandle 捨棄輸出,或 OpenStandardOutputHandle 繼承父節點的標準輸出。

當此性質為且nullRedirectStandardOutput為 時false,程序通常繼承父程序的標準輸出。 然而,如果 StartDetached 是 true 或程序以 StartAndForget(ProcessStartInfo)開始,標準輸出會被重新導向到 null 裝置。

建議在開始處理後立即丟棄把手。

當此性質不 null成立時, RedirectStandardOutput 且 UseShellExecute 兩者皆為 false。

適用於