apm
There probably isn't anythinb better than using the unsafe code. If you
don't use the unsafe code, you would have to marshal the values to an
unmanaged block of memory, and then read them back. This is probably the
fastest way you are going to be able to do this.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"apm" <Co*********@AdsorptionProcessModeling.com> wrote in message
news:NdCVe.7463$nq.2776@lakeread05...
What is the best way to pass an array of double from C# to a win32 dll
written in C? The C code both reads and redefines elements of the array.
Execution speed is also of concern.
Is there anything better than:
double [] x = new double[5000];
fixed(double* X = x)
{
// call dll
unmanageddll(X);
}