jeudi 2 avril 2015

Read output from pipe line by line on windows c++

I have a c++ program that launches a new process through CreateProcess() and reads the stdout of the new process using a pipe created by CreatePipe(). I am using ReadFile() for reading the stdout from the pipe. ReadFile() function will read only a fixed number of bytes irrespective of newlines, but I want to read the output of the pipe line by line. I have seen this working on Linux but haven't found any example on windows ......


Any help will be highly appreciated....


Thanks.


Aucun commentaire:

Enregistrer un commentaire