I have a parent window form application and a commandline.exe child file. Using a modified MSDN example for anonymous channels (h ttp: //msdn.microsoft.com/en-us/library/bb546102.aspx ) I can send a serialized object from parent to child. The child can deserialize the object and read the values.
Perhaps I misunderstand the mechanics of the anonymous pipe, however I expect the pipe to remain open until I close it, so that I can send another object when I want, however after the object is sent / the pipe is no longer connected (determined by the IsConnected property).
At the moment, when an object is sent from parent to child, the pipe closes (and not "me"). I maintain a reference to the source pipeHandle locally, but it seems it cannot open the pipe again. Should I be able to or not close it first? I don’t see how I can open another new channel, since I cannot pass the handle from the parent to the client (the original pipehandle was passed in arguments in the first instance)
How to send another object from parent to child?
I understand that I can use Named-Pipes, but MSDN recommends anonymous channels for IPC on the same local computer.
Many thanks
Arnie
Arnie source
share