ProcessStartInfo.StandardInputHandle Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a SafeFileHandle to use as the standard input of the child process.
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
Property Value
A SafeFileHandle to use as the standard input handle of the child process, or null to use the default behavior.
Remarks
The handle doesn't need to be inheritable; the runtime duplicates it as inheritable if needed.
Use CreateAnonymousPipe to create a pair of connected pipe handles, OpenHandle to open a file handle, OpenNullHandle to provide an empty input, or OpenStandardInputHandle to inherit the parent's standard input.
When this property is null and RedirectStandardInput is false, the process normally inherits the parent's standard input. However, if StartDetached is true or the process is started with StartAndForget(ProcessStartInfo), standard input is redirected to the null device instead.
It's recommended to dispose the handle right after starting the process.
When this property is not null, RedirectStandardInput and UseShellExecute must both be false.