Results 1 to 4 of 4

Thread: Very Urgent

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    181

    Angry Very Urgent

    Is there any API in .Net to find whether the network cable is plugged / Unplugged?

    Thanks in advance.

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    no there isnt,
    you can use WMI to retrieve the IP address, if it fails that means the cable is not plugged in.

  3. #3
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Hi Kovan,

    I am really battling with this! Could you send me a code example please?

    Much appreciated.

  4. #4
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    read this, good info

    http://www.developersdex.com/asp/mes...2Ephx%2Egbl%3E

    this should work, but its dirty and it requires WMI calls (which are slow most of the times, and the documentation is very very poor for WMI)

    I will try to dig up how i implemented this, but i think mine was dirtier than anything, from what i vaguely remember, i would check IP address of a network connection, if it failed(threw exception) it was because network cable was not plugged, and if it was plugged it would either return nothing or the actual IP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width