Is there any simple way to get a few data variables from a C++ program into C#? Both programs would run on the same computer.
I need this to communicate the results of a C++ coded program (position: x,y (integer) and orientation (double)) to another device using C# coded sdk...
I am thinking along the lines of allocating a memory region then declaring it in a file, reading the file in C# to get the pointers and then working from there using a semaphore to control access.
Would this work? Any references on how to write something like that in both C# and C++?
All help is much appreciated!
Sure! The one example is shared memory: Sharing variables between C# and C++ (that is what you mean with allocate memory and so on)
The second one is the "named pipes" method: http://www.codeproject.com/Tips/420582/Inter-Process-Communication-between-Csharp-and-Cpl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With