From: Luke D. <cod...@ho...> - 2003-11-05 14:15:05
|
----- Original Message ----- From: "Zodiaq" <zo...@as...> To: "MinGW users" <min...@li...> Sent: Wednesday, November 05, 2003 12:52 AM Subject: [Mingw-users] hmmm... capturing output?? > Hello All MinGW users, > > I need for my small project a way to capture data sended to standard > output... for example when calling c++.exe compiler I want to capture and > process any output it sends... I know that I have to use CreateProcess with > special STARTUPINFO structure - special in way that uses my handle for > standard output - so hStdOutput points to my handle and dwFlags uses > STARTF_USESTDHANDLES but how to create handle that would take output from > c++.exe and then how to get resulting text I don't know... For sure some of > you encountered my problem and any road signs where to look for more info > would be highly appreciated... > > -- > regards, Zodiaq You might like to try using _popen() instead of CreateProcess() first, because if it does what you need then it should be a lot simpler. I haven't tried the CreateProcess() way but I guess the handles you use would be created using CreatePipe(). Luke |