How to marshal a struct array in another struct

Jan 13 2004 3:09 PM
Hi Folks: I have difficult to marshal a sturct array in another struct. Both my managed and unmanaged codes are listed below. I appreciate anyone help me out! Thanks! Ting In unmanaged code: typedef struct { int z; char c; } A; typedef struct { int y; A a[3]; } B; In managed code: [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] public struct A { public int z; public char c; } public struct B { public int y; public A[] a; //How to marshal it?????????? };