Hi,
If you are looking to check network status for an active network
connection. You need to a reference to system.management.dll for this to
work.
http://msdn.microsoft.com/library/de...connection.asp
Private Sub GetNetworkStatus()
Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject
moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_NetworkConnection")
moReturn = moSearch.Get
For Each mo In moReturn
Dim strOut As String
strOut = String.Format("{0} - Status {1}", mo("Name").ToString,
mo("Status").ToString)
Trace.WriteLine(strOut)
Next
End Sub
Here is a link to see if you are connected to a network that uses a
ping
http://msdn.microsoft.com/library/de...dunplugged.asp
Ken
--------------------------
"Norton" <no********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi all,
May i know how to get the network status through WMI, i have searched the
WMI properties but cannot find the related property to use.
thx in advance
Norton