I have a setup where a program gets its input like so:
1) user enters a command in a command prompt
2) the text from the command prompt is written to a named pipe
3) a process on the other side of the pipe is reading the input parse and execute the command
I would like to have the ability to store a set of commands in a text file and then have the named pipe feed of the text file.
is there some way to chine the pipe and the file together? or do I need to read the text file and split it into lines which I will write to the pipe one by one
If you use named pipe it might be possible,
if you take a look at this, you can see they use plain
CreateFileto open the pipe, taking a look at that, it seems you cannot redirect but you have to read and write, at least with the API is the sameReadFileWriteFile.