2
votes

I am working to create a C# .NET application (single threaded). I am in need to receive data from an existing MFC application running on the same computer. My .NET application is event driven from some windows form objects like buttons and such, as well as a serial port input. So for example, my event handler is called only when there is new serial data. I am wondering if there is an IPC mechanism that could be setup in an event driven way as well? I was looking at named pipes but haven't seen any examples online of others using it in this way.

1
Side note: don't add tags to title and skip thank you notes/tagline in future post.Alexei Levenkov
Same for sockets and named pipes, you'd use BeginRead(). The callback runs when something is received.Hans Passant

1 Answers

1
votes

WCF includes a mechanism for handling callbacks and events. This can be configured to work over named pipes if you're on a local machine, which makes it very fast and efficient.