J
John
public const int FRAME_LENGTH=144;
[StructLayout(LayoutKind.Sequential, Pack=1)]
public class FRAME_T
{
public byte []Block = new byte[FRAME_LENGTH]; }
public void MyDataHandler(IntPtr appContext, IntPtr data)
FRAME_T frame = new FRAME_T();
Marshal.PtrToStructure(data, frame);
This code throws an exception on the PtrToStructure saying there is a
null reference.
What am I doing wrong?
THANKS!!!
John
[StructLayout(LayoutKind.Sequential, Pack=1)]
public class FRAME_T
{
public byte []Block = new byte[FRAME_LENGTH]; }
public void MyDataHandler(IntPtr appContext, IntPtr data)
FRAME_T frame = new FRAME_T();
Marshal.PtrToStructure(data, frame);
This code throws an exception on the PtrToStructure saying there is a
null reference.
What am I doing wrong?
THANKS!!!
John