I have a C++ DLL which returns a pointer to a struct which is abstract, this hides the interface of the underlying class. The DLL exports just one function, getInstance, which creates an object of a C++ struct which inherits from this abstract struct, and returns it as a pointer to the abstract struct type.
As far as I can find C# does not allow abstract structs, and you can’t have a pointer to a C# class, so I can’t think of a way of getting this struct from C++ to C#
Thanks.
In C++, structs and classes are the same. The only difference is that they default to different access specifies (struct uses public by default, class defaults to private).
So your abstract C++ struct becomes a C# class, not struct.