I noticed that there are many places we have something like this:
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class E2H_LANEFIND_DATA_T
{
....
}
class definition with StructLayout. Is that ok or StructLayout is only for struct?
The documentation clearly states:
Emphasis was mine.
The main consideration to make in this situation is whether you want your instances to be passed by value or by reference, in which case you would respectively use a struct or a class.