Hi,
at least in Germany you often pay for the online time and not the traffic.
So this is not really satisfying.
I experimented a lot using the Connection Manager and made the following
observations:
* Using the System.Net.Sockets TcpClient .NETCF does not automatically
connect to the Internet. So in this case one must P/Invoke the Connection
Manager anyway. This has the advantage that ConnMgrReleaseConnection orderly
disconnects just as expected.
* Using the System.Net HttpWebRequest causes .NETCF to automatically connect
to the Internet using the Connection Manager. However, using P/Invoke the
Connection Manager to manually connect and disconnect in this scenario no
longer works!
* If I used the HttpWebRequest it disconnects anyway after 10 Minutes.
* Although documented differently with the Pocket PC 2003 SDK, the second
parameter to ConnMgrReleaseConnection is not a BOOL but a LONG that provides
the connection cache time in seconds (at least with WM2003). The SmartPhone
2003 SDK has the correct documentation for this.
IMHO the .NET HttpWebRequest either just does not call
ConnMgrReleaseConnection at all (which I would consider a real bug), or it
calls ConnMgrReleaseConnection with a 10 minutes caching timeout. In either
case not very helpful.
Cheers,
Andreas
Connection Manager Disconnect method let's CM to know that it's ok to
disconnect, but does not actually hang up in WM2003.
RasHangup will not work with CM handle.
Suposedly you don't want to diconnect as the connected state does not equal
traffic and traffic is what you are paying for. Think of it as conected but
dormant
--
Alex Feinman
---
Visit
http://www.opennetcf.org
Hi,
I've use the connection manager to establish a GPRS connection, having that
worked, I've tried to disconnect using these commands:
CM.Disconnect(CM.Handle);
CM.Disconnect();
RasHangUp(CM.Handle);
// RasHangUp is defined like this
[DllImport("Coredll.dll")]
public extern static uint RasHangUp(IntPtr hrasconn);
None of them seems to work.
Any help would be great!
Tomer.