GPRS /FTP Windows mobile 5

X

Xavier PACOTTE

Hello,

We have a problem with the GPRS connexion and the FTP communications
under windows Mobile 5
We tried several possibilites :
1) With the RasDial/RasHangUp functions for the connection and InternetConnect/
InternetOpen for the FTP protocol. Sometimes we can send a file, often no.
2 ) With the Connectionmanager functions of Opennetcf (version 1.4), we can connect to Internet
but the different funtions InternetOpen.. don't work.
We cannot use the more recent version of opennetcf ( =2.0), because we work in VB.net 2003.
The first possibility works very well in Windows CE.net.
Do you have a solution or an example ?

Best regards
 
G

Guest

You can use the ConnMgrMapURL api to get the GUID for the appropriate
connection and then ConnMgrEstablishConnection to actually establish the
connection through the connection manager. This is actually quite easy to do
using PInvoke. Don't forget to call ConnmgrReleaseConnection when you are
done with the connection.

Check out this link for VB definitions:
http://www.pcreview.co.uk/forums/thread-1297703.php

Rick D.
Contractor
 
X

Xavier PACOTTE

In fact, the function for connecting to FTP server returns me automaticallly
:
- 0 for the handle and 6 for GetLastError
FTPHandle = InternetConnectW(ConnectionHandle,

strFTPServerName,

INTERNET_DEFAULT_FTP_PORT, strUsername,

strPassword,

INTERNET_SERVICE_FTP,

INTERNET_FLAG_PASSIVE, System.UInt32.Parse("0"));


a negative handle
 
G

Guest

Win32 code 6 is "The handle is invalid". Suggest to look at your code that
create the handle. What is ConnectionHandle? looks like a property.

--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top