Question

I'm writing a program which utilizes a third party C++ library. I've written a C++/CLI wrapper to be able to expose some of the methods needed to my C# application, however I'm running into a bit of a problem.

The external library has a multitude of custom classes and objects that I'll need to have access to in order to do what I need to do. However, I won't be able to access these objects from within the C# application, where we would like to keep most of the business logic.

My question is: do I need to write C# versions of these objects to be able to pass them back through the C++/CLI wrapper, or is there an easier way to do this?

I'm using the B-TK framework (https://code.google.com/p/b-tk/) if that helps.

Was it helpful?

Solution

It's just as hard, but you're supposed to do the reverse: Write C++/CLI managed versions of these classes, that can be used from C#. Like the others said, if you can do it with a tool, you should.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top