Is it possible to create a process and redirect its input and output but set the child not to inherit socket handles ? ( maybe pinvoke with CreateProcess somehow )
If I use UseShellExecute = true the child doesn’t inherit the socket but I cant redirect output.
Is it possible to create a process and redirect its input and output but
Share
CreateProcess takes a STARTUPINFO as one of its parameters. Three of the fields in this struct are the in, out and error handles.
Don’t forget to set the
STARTF_USESTDHANDLESflag.Edit: So you have to set the
bInheritHandlesparameter. See this page for more information about inherited handles.