Reputation: 62
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 .
Upvotes: 0
Views: 1530
Reputation: 84
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.
There are several other ways.
Upvotes: 0
Reputation: 9237
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.
Upvotes: 1