I'm trying to wrap a set of C++ functions and structs based on a header file. So far I think I understand the concepts behind wrapping each structure, but I'm not sure how to pull this one apart:
typedef struct
{
BYTE commCode;
*other stuff*
struct
{
DWORD size;
LPBYTE payload;
}
Data;
}
Set, *CommSet;
Should I do something like this?:
[StructLayout(LayoutKind.Sequential)]
public class Set
{
public byte commCode;
public class DATA
{
public uint size;
public byte[] payload;
}
}
But at this point I'm not sure how to account for the other type, the *CommSet
pointer. Do I need a separate structure/class for that?