Search code examples
c#connectioncompact-frameworkterminate

Terminating and Starting Data Connection on Windows Mobile 6.5 in C#?


I want to create an easy application for windows mobile devices, i have recently got a HTC HD2 and the connection is being eaten by the weather app, email accounts and windows live service :@

I am getting rather annoyed with this and well I have set myself a project to give myself a small piece of glory and create a working application that will Terminate an idle connection on my phone.

I am using C# and the latest WM6.5 sdk.

How do I access these controls?


Solution

  • You should use the ConnectionManager APIs to access device connections. It will create them or hand existing connections to your application. Closing a connection is actually very difficult to do (probably becasue it's not terribly nice to tear a connection out from under another running app) and has to be done via P/Invoking to RAS.