Hi,
If you are looking to check network status for an active network
connection. You need to a reference to system.manageme nt.dll for this to
work.
http://msdn.microsoft.com/library/de...connection.asp
Private Sub GetNetworkStatu s()
Dim moReturn As Management.Mana gementObjectCol lection
Dim moSearch As Management.Mana gementObjectSea rcher
Dim mo As Management.Mana gementObject
moSearch = New Management.Mana gementObjectSea rcher("Select * from
Win32_NetworkCo nnection")
moReturn = moSearch.Get
For Each mo In moReturn
Dim strOut As String
strOut = String.Format(" {0} - Status {1}", mo("Name").ToSt ring,
mo("Status").To String)
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********@hot mail.com> wrote in message
news:%2******** *******@TK2MSFT NGP12.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