且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

跨 C/C++(非托管)和托管 C# 代码共享通用定义

更新时间:2023-02-08 13:47:15

很明显,我不熟悉您的项目,但您是否考虑过在 C++/CLI?借助 C++/CLI 编译器为您执行的It Just Works"黑客攻击,您可以多次使用本机代码来回编组和共享托管类型.

I'm not familiar with your project(s), obviously, but have you considered building a managed bridge for your library in C++/CLI? With the "It Just Works" hackering the C++/CLI compiler does for you, many times you'll be able to marshal and share managed types with native code and back and forth.

同样,如果没有更多细节,我不知道它是否适合您,但它可能值得研究.

Again, I don't know if it's right for you without more specifics, but it might be worth looking into.