Jump to content

SmartPhone 2003, ActiveSync and C#


Guest Kryptonic

Recommended Posts

Guest Kryptonic

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

Link to comment
Share on other sites

  • 3 months later...
Guest nitramk
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 by nitramk
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.