Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are windows IPC methods

Tags:

c++

c#

.net

vb.net

dde

Question: I have a dll that I can load in another program. Now the dll has access to all data/functions in the other program.

Which technology can I use that now an external program can send data/commands to that dll, to steer the other program, or get data from it ?

I mean, in the past that meant DDE, I think that was back in Windows 3.11/95 times. What can I use today? Which one is easiest ? Which one is fastest?

like image 973
Stefan Steiger Avatar asked Dec 17 '22 01:12

Stefan Steiger


2 Answers

Some common ones are:

  • Named Pipes. Fairly easy to implement.
  • Shared Memory. A little more work but may be a little bit faster (at least in my testing).
  • Sockets. This is fairly simple and very portable but not as high performance. But it is sure nice if you suddenly want to be able to communicate with a process running on a different machine.
like image 117
Mark Wilkins Avatar answered Dec 23 '22 15:12

Mark Wilkins


COM is the de-facto standard IPC mechanism for Windows-focused applications nowadays.

It allows access across language-barriers, solves the binary interface compatibility problem, does transparent marshalling for you and has different threading models.

sharptooth summarized some facts nicely here.

like image 40
Georg Fritzsche Avatar answered Dec 23 '22 13:12

Georg Fritzsche