Can someone please explain the following Argument Exception : The structure must not be a value class to me please. It's being cause by the following line of code in my program:
Marshal.PtrToStructure(m.LParam, dbh);
given that dbh is of type:
[StructLayout(LayoutKind.Sequential)]
public struct Device_Broadcast_Header
{
public int dbch_size;
public int dbch_devicetype;
public int dbch_reserved;
}
Thanks