How to Marshal a struct array embeded in another struct
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??????????
};
mibuytPosted Apr 16, 2005, 12:35 PM
jcity444Posted Mar 21, 2005, 11:41 PM
kbg_gremlinPosted May 12, 2004, 10:54 AM