Create Schedule Table with PLin-API
Posted: Mon 14. Mar 2011, 18:03
Hello,
I'm having trouble while creating a schedule table with the PLin-API
The client is registered and the hardware is connected, but I keep getting this error:
System.Runtime.InteropServices.MarshalDirectiveException
This is my code:
Thanks for you help.
I'm having trouble while creating a schedule table with the PLin-API
The client is registered and the hardware is connected, but I keep getting this error:
System.Runtime.InteropServices.MarshalDirectiveException
This is my code:
Code: Select all
Peak.Lin.TLINScheduleSlot t;
t = new Peak.Lin.TLINScheduleSlot();
t.Delay = 10;
t.Type = Peak.Lin.TLINSlotType.sltUnconditional;
t.FrameId = new Byte[8];
t.FrameId[0] = (byte)0x0b;
Peak.Lin.PLinApi.SetSchedule(m_hClient, m_hHw, 0, ref t, 10);
Peak.Lin.PLinApi.StartSchedule(m_hClient, m_hHw, 0);