Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IsNetworkAlive for Windows CE

Status
Not open for further replies.

temm31

IS-IT--Management
Jun 3, 2008
1
GR
Hello,

I'm writing a small app for a windows cd 5.0 device in .net 2005. This will be connected via Wifi.
I am trying to determine when the device is connected to the network. The IsNetworkAlive api call works fine on a Windows 2000/xp pc (example follows)

Private Declare Function IsNetworkAlive Lib "SENSAPI.DLL" (ByRef lpdwFlags As Long) As Long
Const NETWORK_ALIVE_AOL = &H4
Const NETWORK_ALIVE_LAN = &H1
Const NETWORK_ALIVE_WAN = &H2

Dim Ret As Long
If IsNetworkAlive(Ret) = 0 Then
MsgBox "The local system is not connected to a network!"
Else
MsgBox "The local system is connected to a " + IIf(Ret = NETWORK_ALIVE_AOL, "AOL", _
IIf(Ret = NETWORK_ALIVE_LAN, "LAN", "WAN")) + " network!"
End If


Is it possible to do this on Windows CE?

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top