What's the best IPC method for intra-machine process communication in Win32?

If you have some time to spare, and if you like risk and experimentation, you can use the undocumented Windows feature: Local Procedure Call . It's been there forever, and it's probably the fastest, because it's the foundation for all others.

Up vote 3 down vote favorite 2 share g+ share fb share tw.

I need to implement inter-process communication system for processes (in machine-wide) in Win32 using native C++ (.NET is not applicable). For more detail, I'm considering message routing system between the processes using binary formatted messages. Message sending/receiving must be asynchronous.

TCP socket could be one of the selection. But, I just want to know if there could be better choice for high performance. (I can ignore security problems.

) I'm not requesting detailed code, but just your insights. C++ c windows ipc link|improve this question edited Apr 4 '11 at 8:05Chris Becke15.1k11647 asked Apr 4 '11 at 7:10Daniel K.1478 67% accept rate.

1 Its worth mentioning that the Windows API is a C API. – Chris Becke Apr 4 '11 at 8:03 possible duplicate of any good and simple RPC library for inter-process calls? – dalle Apr 4 '11 at 8:05.

If you have some time to spare, and if you like risk and experimentation, you can use the undocumented Windows feature: Local Procedure Call. It's been there forever, and it's probably the fastest, because it's the foundation for all others.

This is interesting: is the first time I heard about it – Felice Pollano Apr 4 '11 at 7:34 Well, according to that Wikipedia link, Local Procedure Call only allows calls within the same machine. – Amigable Clark Kant Apr 4 '11 at 7:35 @Amigable - yes, as the question was about "intra-machine" IPC – Simon Mourier Apr 4 '11 at 8:06 Interesting! Worth to try!

– Daniel K. Apr 4 '11 at 8:14 Oops, my understanding of English just improved, sorry. – Amigable Clark Kant Apr 4 '11 at 9:25.

You shoul have a look at named pipes too: msdn.microsoft.com/en-us/library/aa36559.... I know of MemoryMappedFiles too for IPC: msdn.microsoft.com/en-us/library/ms81061..., but I personally never tryed. I used both NamedPipes and Socket on a single machine IPC strategy, but I frankly nevear measured performance difference between the two approach, or at least I did not notice a so big difference to say "avoid this..." or "prefer this other...".

Maybe starting with the technology you are more confident in will give you a good working result, and more free time ;).

1 yep. See this link on SO as well: stackoverflow.com/questions/1882886/… – Simon Mourier Apr 4 '11 at 7:27.

I'm a fan of memory mapped files. Wrapped with reader/writer locks to provide access restrictions.

1 -1 For posting an answer with just a naked link with no context what so ever (I was going to flag it , but it might actually be one). – Johan Dec 15 '11 at 12:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions