Hi, 2012/4/29 Nagaev Boris <[email protected]>: > Hi! > > On Sun, Apr 29, 2012 at 02:49, Mohammed Rashad > <[email protected]> wrote: >> Hi, >> Thanks. I saw that you are using system command to execute a process. Is >> there any alternative to execute process, PIPE ing stdout and stderr to a >> std::stringstream without writing to file? > I think, it is possible, at least on Unix, but has not been done yet :)
under windows you can use CreateProcess (http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx) within the STARTUPINFO sturcture (hStdOutput) you can point to a Pipe created with CreatePipe (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365152%28v=vs.85%29.aspx) to directly read the stdout via ReadFile (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365467%28v=vs.85%29.aspx) -- Regards, Marco ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
