2
Answers

linking c++ project in .net

varsha

varsha

7y
162
1
i have a c++ project were it reads two files and stores its values in a vector of vector of struct.
can anyone tell me how to use those stored values in the form. i need to use those values and draw curve in the panel. please suggest me any methods or procedure to follow for using those values. 
Answers (2)
0
Reshwanth S

Reshwanth S

NA 1.5k 11.6k 7y
you can't use native vectors in managed code.
 
You can write a wrapper DLL in C++/CLI to copy data from the native heap to the managed heap (gcnew+pin_ptr+memcpy). If you prefer streaming your data you can implement a COM interface like IStream (declared in Windows SDK's Objidl.h) and refer to it as System::Runtime::InteropServices::ComTypes::IStream from managed code.
 
Suggested reading:
 
Native and .NET Interoperability
 
Interoperating with Unmanaged Code 
Accepted
0
varsha

varsha

NA 46 1.7k 7y
thank you for the suggestion i would go through them