Process interaction(c# and pure c++)
I've got c# dispatcher and fast c++ program for data processing.I need pass data(initializtion) to c++ program from c# dispat开发者_如何学Gocher. Passing data is primitive type: config strings, decimals. I don't want use file or command line arguments for interaction. I think it should be smarter way. Now interaction is one-way, but I think at the future it could be two way. Can you advice me appropriate way for my task?
Thanks
you could make use of C++/CLI DLL as the middle layer.
You could use environment variables, that's a common method for passing options and data to a child process.
If you have the C++ source code, I like @ghimireniraj's idea of making the C++ code into a .NET assembly using the C++/CLI compiler, then you don't actually need to start a separate program, and you can pass your data as function arguments.
精彩评论