ajlajlajl
ajlajlajl

Reputation: 187

Share data between C++ and C# or VB (2 running program)

is there a way (other than network(i hate io-streams)) to communicate between 2 process? one in c++ and other one in C# or VB. my problem is, im writing a AVR program using c++, but for debugging purpose i need a GUI to test different inputs. since i donno anything about GUI in c++ ( and i have no plan to learn it), i want to write the GUI using .net and somehow connect it to my c++ code. since i have 2 running process i cant use p/invoke and other similar methods. If i could share my variables between 2 process or call a function in c# from c++ (from running process to running process), that would solve my problem. anything other than sockets?

Upvotes: 0

Views: 536

Answers (2)

Erik Šťastný
Erik Šťastný

Reputation: 1486

What about databases? if you are using MS you can try MSSQL.

Its absolutely free for small databases i think :)

Upvotes: 0

Humam Helfawi
Humam Helfawi

Reputation: 20311

Since you mentioned .NET you probably on MS Windows. You may use DDE (Dynamic Data Exchange):

https://msdn.microsoft.com/en-us/library/windows/desktop/ms648774(v=vs.85).aspx

You can find .NET tutorial for it here:

http://blogs.artinsoft.net/Mrojas/archive/2009/06/10/DDE-in-NET.aspx


If you want fast dummy solution that will work for you just for debugging not as real solution. You may share your data by writing them to the hard disk and reading it from it again. It is not hard neither complicated.

Upvotes: 1

Related Questions