I've just learned a few things about Microsoft CreateProcess function but I still don't know how to redirect in, out and err streams to my own streams. For example if I create process like that:
...
comp_exec_args.success = CreateProcess(NULL, comp_exec_args.params, NULL, NULL, comp_exec_args.inherit_handle,
comp_exec_args.c_flags, NULL, comp_exec_args.root.c_str(),
&comp_exec_args.startup_info, &comp_exec_args.process_info) ;
...
then how can I create proc_in, proc_out and proc_err variable of type std::istream, std::ostream and std::ostream respectively that they will become in/out/err streams of the process ? To be more precise I can say that I don't want process streams to be connected to the default standard in, out and err streams but I want to hold them elsewhere.