Link to home
Start Free TrialLog in
Avatar of Shailendra Singh
Shailendra Singh

asked on

crate a Safe array to send data from C++ to C# interface.

I have a C# interface exposed to C++ via COM (tlb file),In this interface function i want to send array of  a Object s Object .Class of this object is complex and have different datatypes.I am using Connection pointer for call backs. Now my point is how can i use Safearrays to transfer data from C++ to C# UI.
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Array ar = Array.CreateInstance(typeof (myObj), 500);

Open in new window


where 500 is the size of the array.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.