KUMAR619 wrote:
I want to pass values to that running EXE without creating new EXE.
This is quite possible, but first I want to warn you: in most cases, this is a pretty bad idea. You want to exchange data and actually some events between different existing processes. The processes are primarily designed for isolation, not for collaboration. Indeed, the are strongly isolated, even executed in different address spaces.
First of all, think about having just one process, and what you had for the second application, rework into the class library to be used in another one.
If you still have to have different processes, for one or another reason, you need some
IPC. Please see:
http://en.wikipedia.org/wiki/Inter-process_communication[
^].
With .NET, it may range from using sockets, named pipes, to "classical" remoting to WFC (typically, self-hosted in the application receiving messages from another applications). In turn, both remoting and WFC use
channels (and their operation is abstracted from particular channels), and the channels use internally either named pipe (this type of channel is also called "TPC", but this is slightly different meaning of this term) or network sockets. By the way, you may not need physical network; originally, sockets were development as an IPC device for communications on the same computer.
Please see:
http://msdn.microsoft.com/en-us/library/system.net.sockets.tcplistener%28v=vs.110%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient(v=vs.110).aspx[
^],
http://msdn.microsoft.com/en-us/library/system.net.sockets%28v=vs.110%29.aspx[
^],
http://msdn.microsoft.com/en-US/library/kwdt6w2k%28v=vs.100%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/ms754130%28v=vs.110%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/aa970268(v=vs.110).aspx[
^].
Besides, you will need separate threads in one or both applications (if in one, it should be receiving application; the thread listening for messages from another application). You need to avoid polling of data, so, you waiting calls should be
blocking, which is possible with named pipes or sockets.
—SA