I'm trying to specify the requirement from unmanaged DLL component that will
be used by a managed application written in C#.
The unmanaged DLL is implementing some kind of algorithm for defect
detection that will generate results. Each defect result should be a
structure containing the data of the found defect. The number of defect is
known only at the end of the algorithm at the unmanaged side.
The managed application should get the defect results and display them in a
DataGridView.
My question is:
How will the defects results data will be transferred from the unmanaged DLL
to the managed application without doing any memory copying?
I do not want to copy the memory (containing the defects data) for that. Is
there a way get the results without doing the memory copy?
I can allocate a big (the largest ) chunk of memory at the managed
application side, and letting the unmanaged component fill it with the
results. But this solution is ugly and the amount of memory to allocate may
be a problem.
--
Thanks
Sharon