ProcessStartInfo.StandardErrorHandle 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 error of the child process.
public:
property Microsoft::Win32::SafeHandles::SafeFileHandle ^ StandardErrorHandle { Microsoft::Win32::SafeHandles::SafeFileHandle ^ get(); void set(Microsoft::Win32::SafeHandles::SafeFileHandle ^ value); };
public Microsoft.Win32.SafeHandles.SafeFileHandle? StandardErrorHandle { get; set; }
member this.StandardErrorHandle : Microsoft.Win32.SafeHandles.SafeFileHandle with get, set
Public Property StandardErrorHandle As SafeFileHandle
Property Value
A SafeFileHandle to use as the standard error 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 discard error output, or OpenStandardErrorHandle to inherit the parent's standard error.
When this property is null and RedirectStandardError is false, the process normally inherits the parent's standard error. However, if StartDetached is true or the process is started with StartAndForget(ProcessStartInfo), standard error 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, RedirectStandardError and UseShellExecute must both be false.