... it is not clear for me how it work so I asked for maybe a simple demo ....
Maybe explain what you are actually trying to achieve.
What is the process you are calling?
Is it one you have written, or is it a 3rd party console tool?
What data are you trying to give to the process?
And what data are you trying to receive?
There are other ways to send data to a process, which might be more suitable (reliable) if you are writing the process you are executing.
If its a 3rd party process, then what is it, and then someone can write up a quick example of how to communicate with the process.