语言

ProcessStartInfo.StandardInputHandle 属性

定义

获取或设置用作子进程的标准输入的 a SafeFileHandle 。

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

属性值

一个 SafeFileHandle 用作子进程的标准输入句柄,或使用 null 默认行为。

注解

句柄不需要可继承;运行时根据需要将其复制为可继承。

用于 CreateAnonymousPipe 创建一对连接的管道句柄、 OpenHandle 打开文件句柄、 OpenNullHandle 提供空输入或 OpenStandardInputHandle 继承父级的标准输入。

如果此属性是 null 且 RedirectStandardInput 为 false此属性,则该过程通常继承父级的标准输入。 但是,如果是StartDetachedtrue或进程启动StartAndForget(ProcessStartInfo),则标准输入将改为重定向到 null 设备。

建议在启动进程后立即释放句柄。

如果此属性不是 null, RedirectStandardInput 并且 UseShellExecute 必须两者都是 false。

适用于