there is two separate processed running on same PC i want to communicate between this two process. like pass some data from one process to other .
-
possible duplicate of [C# communication between processes](http://stackoverflow.com/questions/2443211/c-sharp-communication-between-processes) – Ian Mercer Dec 31 '14 at 06:00
-
Google "windows interprocess communications". – RenniePet Dec 31 '14 at 06:26
-
Or Bing "windows interprocess communication" , "DLL", "Windows communication foundation" – Saher Ahwal Dec 31 '14 at 06:35
-
can you please give simple example of Google or Bing "windows interprocess communication" ? – Dhaval Dec 31 '14 at 07:06
-
Here is an example, I am not sure I understand we are just telling you to look it up http://tinyurl.com/l53mmwt – Saher Ahwal Jan 04 '15 at 19:49
2 Answers
WCF
Windows Communication Foundation
In general you need to implement a client - server architecture and define interface endpoints to communicate between the process that acts as client and the server process.
The other way is to create a Remotable Class a dynamic library (DLL) so that the same remoted class can be referenced by both the client and the server.
The server will have to create instance of the remote class to be able to make sense of the object-oriented data you communicate, and can listen for example on a TCP channel.
e.g
ChannelServices.RegisterChannel( new TcpChannel( PORT_NUMBER) );
RemotingServices.Marshal( your_remoted_class, "name_connection" );
Or for local use you can just use the IpcServerChannel API
Now on Client if you used TCP port to listen on for server
string remoted_url = "tcp://localhost:<your_port_number>/connection name";
remoted_object = (RemotedClass)RemotingServices.Connect
( typeof(RemotedClass), remoted_url );
The client can now call the public functions through remote_object.

- 9,015
- 32
- 84
- 152
If you are little bit specific about technology, then I could narrow down my answer.
In a very generic note, these are ways to communicate between two processes.
- Message communication through a common file.
- Socket communication between two processes.
- Mutex
- Any intermediate service.
There are several other ways.

- 84
- 9