How can I redirect stdout to some visible display in a Windows Application?

后端 未结 8 1329
时光取名叫无心
时光取名叫无心 2020-11-27 03:31

I have access to a third party library that does \"good stuff.\" It issues status and progress messages to stdout. In a Console application I can see these messages just f

8条回答
  •  执笔经年
    2020-11-27 04:12

    You need to create pipe (with CreatePipe()), then attach stdout to it's write end with SetStdHandle(), then you can read from pipe's read end with ReadFile() and put text you get from there anywhere you like.

提交回复
热议问题