Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear friends.
I have an issue with using gnuplot with redirected IO. I have developed a C software for simulations of electromagnetic fields propagation and I would like to use gnuplot as plotting engine.
I have done this quite successfully using CreatePipe and CreateProcess fucntions on Win32. But one thing I could not achieve: retrieving output from gnuplot.
My best guess is that it does buffered output do stdout and I cannot use ReadFile on the handle, since data printed to stdout wont be passed to the buffer directly, given that it is buffered.

My questions:
1. Is there a way that I use setvbuf to set the buffer mode of the stdout of another (child) process?
2. Is there any other way that I can achieve piped communication to stdout and stdin of a gnuplot process on Win32?

Thanks in advance!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900