Link to home
Start Free TrialLog in
Avatar of Iys
Iys

asked on

Ipc between .net service and unmanaged c++ process

Hello experts.
What is the best way to implement IPC between a .net service and an C++ unmanaged process.
thanks.
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Iys
Iys

ASKER

Thanks for the greate links.
How can I use name pipes to cmmunicate between one server and many different clients
the server will accept multiple connections (all with the same name). Clients don't have to do nothing special.
Avatar of Iys

ASKER

But how can I distinguish one client from another ?
If I write who would recieve, and if I read from whom am I reading ?
you have to put some information inside the data you pass from the client to allow the server to distinguish among stations. The server should store the pipes in some kind of collection. I suggset to put in a Dictionary<> generic collection, and use the station name as the Key.
 
 
Avatar of Iys

ASKER

but if it is only one named pipe how can the server address a specific client ?
there is not just one pipe at server side, the server creates a pipe object for each connection. There is a listener method that wait for connections and create the pipes as needed, have a look to the code in my previous link:
http://www.codeproject.com/KB/threads/dotnetnamedpipespart2.aspx
 
Avatar of Iys

ASKER

Thank you.
HI,

  can u please give me the sample code in both c++ and c# regarding pipes usage.

Regards,
Sudhakar.