check out C++/CLI (aka managed C++). Write a wrapper that uses your native class as a member
It is best to write a corresponding Interface for each native concrete class used, and use INativeCore instead of NativeCore in Managed C++ to avoid some pitfalls
// in your native core:
// define an interface wrapper for your native core
class INativeCore{
// ...
}
class NativeCore: public INativeCore{
// ...
}
// in your C++/CLI code
ref public class ManagedClass{
private:
INativeCore* pCore; // delegate all method calls to native core
public:
void foo(){
pCore->foo();
}
// ... other methods
}
One way is managed c++, but it may cause major changes to the code.
The other is linking
check out C++/CLI (aka managed C++). Write a wrapper that uses your native class as a member
It is best to write a corresponding Interface for each native concrete class used, and use INativeCore instead of NativeCore in Managed C++ to avoid some pitfalls
equivalent SO question