Guest Kryptonic Posted December 9, 2005 Report Posted December 9, 2005 Hi all, is it possible, at runtime in a c# .net application running on a mobile device (2003) to check the state of the activesync connection (on the mobile device remember) and if there is no connection attempt to connect it up? cheers Will
Guest Tech Posted March 11, 2006 Report Posted March 11, 2006 think you can do this on AS 4.0 or higher with the API's/SDK
Guest nitramk Posted March 12, 2006 Report Posted March 12, 2006 (edited) Hi all, is it possible, at runtime in a c# .net application running on a mobile device (2003) to check the state of the activesync connection (on the mobile device remember) and if there is no connection attempt to connect it up? cheers Will <{POST_SNAPBACK}> I've got this code from somewere: It's a function which returns true if Active Sync is connected. The function simply checks whether the Dns.GetHostEntry("PPP_PEER") not is equal to null and not will throw any exeptions, then the AS is connected. public bool ActiveSyncConnected() { bool result = false; try { if (Dns.GetHostEntry("PPP_PEER") != null) { result = true; } } catch { } return result; } Edited March 12, 2006 by nitramk
Guest Tech Posted March 13, 2006 Report Posted March 13, 2006 that really isnt the correct way of doing it. there maybe another dns hostname as that and not being the mobile device ;)
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now