开发者

Process interaction(c# and pure c++)

开发者 https://www.devze.com 2023-03-15 10:19 出处:网络
I\'ve got c# dispatcher and fast c++ program for data processing.I need pass data(initializtion) to c++ program from c# dispat开发者_如何学Gocher.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消