Search code examples
c#c++memorysharedinject

Sharing variable between C# and C


I've seen a few answers for almost the same question, but there wasn't C# code to help me understand.

I have a C++ .DLL file injected into memory. Although, this DLL simply fetches information from the application and also gets information from the C# .exe.

The C# exe information will change every second, while the C++ information will change only once or twice.

How can I create a shared variable between the two running applications, and how can I read/write to it?

Thank you!


Solution

  • I will be using a named pipe so the two processes can communicate together easily! (C# server and C++ Client)

    Thanks for the help everyone!