I have a map (enum, vector< double >) in c++ code that I want to access from a c# application. This is legacy code, so I'm limited to using COM objects to pass information. Currently we pass in one enum at a time to c++, and get back one vector at a time as a SAFEARRAY.
I tried passing in a SAFEARRAY of enums, and returning a SAFEARRAY of SAFEARRAYs of doubles. In c#, my SAFEARRAY of SAFEARRAYs becomes a multi-dimension array, where I really want a jagged array.
- Is there a way to use SAFEARRAYs to produce a jagged array in c#?
- Are they other ways I could use to pass the vectors from the map to c#?