I am using a struct to pass to an unmanaged DLL as so -
[StructLayout(LayoutKind.Sequential)]
public struct valTable
{
public byt
I would recommend to write this code.
[StructLayout(LayoutKind.Sequential)]
public struct valTable
{
public byte type;
public byte map;
public byte spare1;
public byte spare2;
public int par;
public int min;
public byte[] name;
static public valTable Create()
{
valTable vT = new valTable();
vT.name = new byte[24];
return vT;
}
}