Communication between two different applications Communication between two different applications windows windows

Communication between two different applications


Look like you'd be interested in Named Pipes to enable IPC, check out this link for an example, or this MSDN link.

Grabbing the code from the NamedPipeServerStream page of MSDN illustrates most simply (see the NamedPipeClientStream page for the client side):

using (NamedPipeServerStream pipeServer =    new NamedPipeServerStream("testpipe", PipeDirection.Out)){    Console.WriteLine("NamedPipeServerStream object created.");    // Wait for a client to connect    Console.Write("Waiting for client connection...");    pipeServer.WaitForConnection();    Console.WriteLine("Client connected.");    try    {        // Read user input and send that to the client process.        using (StreamWriter sw = new StreamWriter(pipeServer))        {            sw.AutoFlush = true;            Console.Write("Enter text: ");            sw.WriteLine(Console.ReadLine());        }    }    // Catch the IOException that is raised if the pipe is broken    // or disconnected.    catch (IOException e)    {        Console.WriteLine("ERROR: {0}", e.Message);    }}