Hello,
Im trying to make a TCP client application for a PDA with Windows Mobile 6 Professional. I tried to make it first on my laptop and it worked. The code for the "smart device" is exaclty the same but it doesn't work.
Here it is the code:
// IP and Port
string IP = "192.168.1.68";
int port = 1000;
// TCP connection
TcpClient connection;
StreamReader TCPreader;
StreamWriter TCPwriter;
//(...)
try
{
connection = new TcpClient(IP, port);
NetworkStream stream = connection.GetStream();
TCPreader = new StreamReader(stream);
TCPwriter = new StreamWriter(stream);
// wait for welcome message
status_label.Text = TCPreader.ReadLine();
}
catch(Exception ex)
{
MessageBox.Show("ERROR: " + ex.Message);
}
An exception is thrown on "readLine()" method call. I can't get the message, otherwise I get something like this "this exception message is not installed, you have to install NETCFv35.messages.en.cab". I already installed that .cab but I get the same message.
What is going wrong? Why this code works on my laptop (WinForms app/NET3.5) and doesn't on PDA (Smart Device/NETCF3.5)? Any suggestion?
Thanks in advance!