Hi,
I want to check the PocketPC whether connection or not...
if the PocketPC can connect to the internet, then the application can be run..
if the pocketpc status is offline, then I enable the user switch on the wifi function!!
Printable View
Hi,
I want to check the PocketPC whether connection or not...
if the PocketPC can connect to the internet, then the application can be run..
if the pocketpc status is offline, then I enable the user switch on the wifi function!!
if you want to check for an internet connection you will have to try a http request
if you want to check for a network connection you will have to check the device's ip address. (if the ip address is not 127.0.0.1 then its connected to a network via activesync or wireless)
Thanks..Quote:
Originally Posted by Strider
but can you give me more hints!!
which method I can use in httprequest!!
Hi,
httpRequest...
VB Code:
Dim Response As WebResponse Dim ResponseStream As Stream Dim Request As WebRequest Connect_To_Server = True Try Request = WebRequest.Create("http://www.google.com") Response = Request.GetResponse Catch webex As WebException Connect_To_Server = False Catch ex As Exception Connect_To_Server = False Finally Cursor.Current = Cursors.Default If Not IsNothing(Response) Then Response.Close() End If End Try
Connected...
VB Code:
Dim localEndPoint As New IPEndPoint(Dns.Resolve(Dns.GetHostName()).AddressList(0), 0) If localEndPoint.Address.ToString <> "127.0.0.1" Then Connected = False End If
Pete
Quote:
Originally Posted by petevick
:thumb: it works well!!