G
Guest
in c I had this structure;
typedef struct _TABLE_LIST {
UCHAR ValidEntries;
STATUS_PACKET Status[50];
} TABLE_LIST, *P_TABLE_LIST;
How do I do the same way in c# with the structures I had below?
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Ansi)]
public struct STATUS_PACKET
{
public ETHERNET_HEADER etherHeader;//14
public GRE_HEADER greHeader;//4
public byte Type;//1
public FILL_BYTES fillBytes;//12
public REVISIONS o_rev;//8
public REVISIONS a_rev;//8
public SWITCH Name;//22
}
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Ansi)]
public struct VALIDENTRY
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst=2)]
public byte NumValidEntries;
}
typedef struct _TABLE_LIST {
UCHAR ValidEntries;
STATUS_PACKET Status[50];
} TABLE_LIST, *P_TABLE_LIST;
How do I do the same way in c# with the structures I had below?
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Ansi)]
public struct STATUS_PACKET
{
public ETHERNET_HEADER etherHeader;//14
public GRE_HEADER greHeader;//4
public byte Type;//1
public FILL_BYTES fillBytes;//12
public REVISIONS o_rev;//8
public REVISIONS a_rev;//8
public SWITCH Name;//22
}
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Ansi)]
public struct VALIDENTRY
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst=2)]
public byte NumValidEntries;
}