I have the following code that works fine for the .NET framework 2003, but when I run it on the Compact Framework 2003 (pocket pc) with service pack 1.0 3, It crash in the ReceiveData. Begin and Endinvoke is recognized in SP2, so I can't see there should be any problem. What goes wrong !!!
public delegate void DelegateRxHandler(byte []pData, byte length);
private DelegateRxHandler RxHandler = null;
public constructor ()
{
Initialize(new DelegateRxHandler(DoSomethingWithReceivedData));
}
public void Initialize(DelegateRxHandler handler)
{
RxHandler = handler;
}
public void ReceiveData
{
------------->crash RxHandler(receivedFrame,rxLen);
}
public void DoSomethingWithReceivedData(byte []pData, byte length)
{
...
}
public delegate void DelegateRxHandler(byte []pData, byte length);
private DelegateRxHandler RxHandler = null;
public constructor ()
{
Initialize(new DelegateRxHandler(DoSomethingWithReceivedData));
}
public void Initialize(DelegateRxHandler handler)
{
RxHandler = handler;
}
public void ReceiveData
{
------------->crash RxHandler(receivedFrame,rxLen);
}
public void DoSomethingWithReceivedData(byte []pData, byte length)
{
...
}