Unplugged cable.

G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.protocol.tcpip (More info?)

My program works in a very "hostile" environment. Users sometimes unplug
network cables. On TCP/IP level this looks like lost connection. Is it
possible to find if the cable is really unplugged?
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.protocol.tcpip (More info?)

It is possible if you have 'Media Sense' enabled:

'ipconfig /all' will tell you whether the cable is unplugged or not.

On Windows XP you can also use NetConnectionStatus member of
Win32_NetworkAdapter WMI class to check whether 'Media disconnected' is set.
More info at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_networkadapter.asp

--
Thanks,
Tansu Dimli

This posting is provided "AS IS" with no warranties, and confers no rights.


"Lev Elbert" <elbertlev@comcast.net> wrote in message
news:ezLMEFePEHA.1644@TK2MSFTNGP09.phx.gbl...
> My program works in a very "hostile" environment. Users sometimes unplug
> network cables. On TCP/IP level this looks like lost connection. Is it
> possible to find if the cable is really unplugged?
>
>