views:

617

answers:

1

So I've been reading lots about interprocess communication on .Net. Named pipes, remoting. It all seems great but possibly overkill for what I need to do.

I want to add a command line interface to my WPF application, so I need a simple IPC mechanism to send the string from one process to the already running app.

What does SO recommend for doing so?

A: 

NamedPipeClientStream and NamedPipeServerStream are pretty simple. Here's a pretty simple example where IPC is used to pass command line arguments from one instance of an application to another. It's not exactly what you want to do, but pretty close.

JP Alioto
great little article about NamedPipes. Thanks bizzaro JP! (I'm JP too).
Jippers
WebArchive for the link that has since died: http://web.archive.org/web/20080506103924/http://www.flawlesscode.com/post/2008/02/Enforcing-single-instance-with-argument-passing.aspx
romkyns