Hey folks,
I have a requirement where I need to marshal an array of structures from managed code(c#) to native code(C++). The structure is something like
//need to put any attributes here?
public struct inner
{
[MarshalAs(UnmanagedType.U8)]
public long l1;
[MarshalAs(UnmanagedType.U8)]
public long l2;
}
public struct outer
{
[MarshalAs(UnmanagedType.LPWStr)]
public string s1;
[MarshalAs(UnmanagedType.U4)]
public int i1;
[MarshalAs(UnmanagedType.U4)]
public int i2;
[MarshalAs(UnmanagedType.U8)]
public long l1;
// How can I marshal an array of structures here?
public inner[] array1;
}
My requirement is to return an array of the struct outer :)
Can anyone help me out?
Thanks in Advance, -Mani.