Possible Duplicate:
Marshaling c structures in c#
Actual C structures:
typedef struct procedure
{
char code[8];
}procedure;
typedef struct p45_cldxed24
{
procedure p45_cldxed[8];
}p45_cldxed24;
What would be the equivalent C# structure for p45_cldxed24? Specifically, how would you marshal the array?
Is this correct?
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
struct p45_cldxed24
{
[MarshalAsAttribute(UnmanagedType.LPArray, ArraySubType=UnmanagedType.Struct,SizeConst = 8,SizeParamIndex=0)]
procedure[] p45_cldxed;
}