I've hunted 3 days to find something that will tell me whether I'm on a Lan or not. Most of it refers to a NIC installed or using PING to see if I'm on the web. Not what I'm after I want to be able to discern if my machine is on the LAN or not.
All my machines are DHCP enabled so I thought of pinging the default gateway in code? Machines off the network on boot up are APIPA so have no default gateway and machines that have been DHCP'd will get a default gateway. if the cable is disconnected they would still have the gateway but it wouldn't be contactable.
So I'm looking for a pass fail routine that will ping the defult gateway. No default gateway = 0, no response from default gateway = 0, response = 1
I've googled and newsgroups but can't find a definitive vb studio 2003 answer?
Anyone able to help.
All my machines are DHCP enabled so I thought of pinging the default gateway in code? Machines off the network on boot up are APIPA so have no default gateway and machines that have been DHCP'd will get a default gateway. if the cable is disconnected they would still have the gateway but it wouldn't be contactable.
So I'm looking for a pass fail routine that will ping the defult gateway. No default gateway = 0, no response from default gateway = 0, response = 1
I've googled and newsgroups but can't find a definitive vb studio 2003 answer?
Anyone able to help.