I need to convert the following C struct that contains an array of pointers to C#:
typedef struct {
float* a[5];
} MyStruct;
I tried the following and the line that reads "public float[] *a;" below doesn't pass the compiler
[StructLayout(LayoutKind.S
equential,
CharSet = CharSet.Ansi)]
unsafe public struct MyStruct
{
[MarshallAs (UnmanagedType.ByValArray,
SizeConst = 5)]
public float[] *a;
}
Any suggestions?
Start Free Trial