I am trying to use pinvoke to marshal a C structure to C#. While I am able to marshal an intptr I cannot find the syntax to marshal a double pointer. Both the int pointer and double pointer are used on the C side to alloc an array of ints or doubles.
Here is the C struct:
struct xyz
{
int *np; // an int pointer works fine
double *foo;
};
And here is the c# class:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public class xyz
{
Intptr np; // works fine
// double *foo ??
}
I am unable to find any instructions on how to marc