GeRmlc,
How is the array declared in the structure? If it is embedded in the
structure, then you can just declare it as an array and attach the MarshalAs
attribute to the field, specifying ByValArray as the UnmanagedType (and the
size as well).
If it is a pointer to an array, then you will have to marshal this
yourself, and manage the memory yourself.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"GeRmIc" <Ge****@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...
Hi,
I have to pass an array containing a structure from a C# library to a C
DLL.
Which is the best way to do it? Hashtable or ArrayList or anyother better
way.
Also, how do i marshal and then retreive the data at the C end.
Thanks