Hello everybody,
I've ran into this today:
I want to write a program that receives data on stdin (and does stuff with them, obviously;) However, the StdIn function of Masm32.lib only works for keyboard input - not for Unix-style pipe or redirect (e.g.
someotherprogram | myProgram
or
myProgram < inputFile.txt
). Ideas, anyone? Thanks.
Posted on 2003-09-08 17:46:10 by lighthousekeeper
There is a tutorial at Iczelion's site that covers pipe's I think that it is exactly what you are looking for:

http://spiff.tripnet.se/~iczelion/tut21.html
Posted on 2003-09-08 18:06:21 by donkey
No, I'm sorry - it doesn't solve the problem. This creates a new pipe and writes to/reads from it.
What I need is a way to read the stdin.
StdIn only works with direct keyboard input - so does the GetStdHandle and ReadConsole thing.
If the stdinput of the program is a stdoutput of another program, the functions seem to think that there's no input.
Posted on 2003-09-09 06:57:38 by lighthousekeeper