Pass an array from C++ to C#?
I am making my first attempt at some interop between a C++ program which uses a C# DLL.
I've got the C++ interacting with the C# through an interface. Now, I need to pass-by-reference three arrays (int, double, string) from C++ to C#, where C# will fill the arrays with information from a database. Afterwards, the information in the arrays need to be used by C++ (hence the pass by ref).
However, i've got issues. For some reason, C# only wants to take "SAFEARRAYS" from C++. I've been doing a lot of reading about SAFEARRAYS, but i can't seem to find any information about getting around it -- can someone tell me what is going on, and how (if at all) i can convert from SAFEARRAY to int, double, string and vice versa?
thanks in advance!