Does anyone have a simple example of using a pipe to communicate between a parent and child process? Thanks!
In assembler, yes:
include \masm32\MasmBasic\MasmBasic.inc ; download (http://masm32.com/board/index.php?topic=94.0)
Init
Inkey "Current time is ", Launch$("cmd.exe /C time /T")
Exit
end start
Seriously: Pipes are a can of worms. For example, to avoid hanging apps, you need to read data in separate threads etc...
To get an idea (and some really good hits), google for SECURITY_ATTRIBUTES HANDLE_FLAG_INHERIT CreatePipe SetHandleInformation CreateProcess WaitForInputIdle CreateThread (https://www.google.com/search?q=SECURITY_ATTRIBUTES+HANDLE_FLAG_INHERIT+CreatePipe+SetHandleInformation+CreateProcess+WaitForInputIdle+CreateThread)
Could be a starting point...
These are the standard native applications (from here (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365780(v=vs.85).aspx)).