A
Alessandro
Hi everybody,
I have a TCP/IP communication library working fine on PC.
I am trying to use it on a PocketPC application. I have simply referenced
the communication library project and build the application.
The application start but calling some method it stops giving a
"MissingMethodException".
Since I have no more ideas to resolve the problem I will try to describe
situation in details.
I had different results:
1- In a first test application calling the "Connect" method I had a
"MissingMethodException" both in Pocket PC and in the emulator
2- In a second test application (different work space) the call to "Connect"
works fine. But I have the same error on the method "Send"
3- I have imported the first test application in the second application
workspace. "Connect" works fine but "Send" gives the exception
4- In a third test application (different work space) I have the same errors
of points 2 and 3.
A have the following code (I have simplified it)
public abstract class BaseClient
{
public abstract void Connect(bool flag);
public void Connect() {Connect(true);}
protected abstract void Send(...);
protected byte[] Transact(...)
{
....
this.Send(...)
}
......
}
public abstract class ModbusClient : BaseClient
{
public void Write(.....)
{
.....
.... = Transact(...);
......
}
}
public class ModbusTcpClient : ModbusClient
{
public override void Connect(bool flag)
{
....
}
public override void Send(...)
{
....
}
}
// Pocket PC Application
{
.....
ModbusTcpClient tcpclient = new ModbusTcpClient (....)
tcpclient.Connect(); // MissingMethodException calling
BaseClient.Connect()
// Exception in first
application......works fine in second application
tcpclient.Write(....); // MissingMethodException on
BaseClient.Transact() calling BaseClient.Send()
// Exception in all application
......
}
Thank you for any help
Alessandro
I have a TCP/IP communication library working fine on PC.
I am trying to use it on a PocketPC application. I have simply referenced
the communication library project and build the application.
The application start but calling some method it stops giving a
"MissingMethodException".
Since I have no more ideas to resolve the problem I will try to describe
situation in details.
I had different results:
1- In a first test application calling the "Connect" method I had a
"MissingMethodException" both in Pocket PC and in the emulator
2- In a second test application (different work space) the call to "Connect"
works fine. But I have the same error on the method "Send"
3- I have imported the first test application in the second application
workspace. "Connect" works fine but "Send" gives the exception
4- In a third test application (different work space) I have the same errors
of points 2 and 3.
A have the following code (I have simplified it)
public abstract class BaseClient
{
public abstract void Connect(bool flag);
public void Connect() {Connect(true);}
protected abstract void Send(...);
protected byte[] Transact(...)
{
....
this.Send(...)
}
......
}
public abstract class ModbusClient : BaseClient
{
public void Write(.....)
{
.....
.... = Transact(...);
......
}
}
public class ModbusTcpClient : ModbusClient
{
public override void Connect(bool flag)
{
....
}
public override void Send(...)
{
....
}
}
// Pocket PC Application
{
.....
ModbusTcpClient tcpclient = new ModbusTcpClient (....)
tcpclient.Connect(); // MissingMethodException calling
BaseClient.Connect()
// Exception in first
application......works fine in second application
tcpclient.Write(....); // MissingMethodException on
BaseClient.Transact() calling BaseClient.Send()
// Exception in all application
......
}
Thank you for any help
Alessandro