|
What you're asking for is a means of communicating with a running program. That is not achieved via any form of command line. A program accesses data on a command line when it starts, and there is no trivial way to change that command line and force the running program to reread it. There is also no trivial way that a program can change it's command line, and use that to communicate with some other program (eg the shell that started it).
To achieve what you want, you need to use some means of interprocess communication, and both programs need to be designed to allow that. Let's say that program A starts program B, and wants to exchange data with program B. A simple option would be for program A to write a data file while Program B periodically checks if that file exists and, if the file exists, reads it and then deletes it. If program B wants to send data back to program A, it can use the same technique (probably with a different filename), and program A needs to poll for and read that file.
Other means of interprocess communication include sockets, mailboxes, dedicated windows messages (eg WM_COPYDATA), etc. But one common feature of all of them; if you want two programs to communicate, BOTH programs need to be specifically designed to cooperate.
|