Hello,
Before I make this code and after some searching, I wanted to know if it is possible to redirect STDOUT and SDTIN to "Named Pipes" which was created by another process.
The goal is to quickly change the code of a console application that interacts with the user. Check it to launch if the "named piped exists, if so, it redefines the standard flow, otherwise we keep the default ones.
Apparently, I would have to turn to the dup () but I am pissed off is that it takes an integer parameter and CreateNamedPipe () returns a handle ... So I think that this will not work, I am wrong?
Is this possible and if this is true, how do I do to achieve it "simply" because I want to avoid setting a mechanism for ReadFile () and WriteFile (), unless I have the choice ...
NB: The choice of "pipe" is a design choice because I also used when creating another process using CreateProcess ().
Bookmarks