B
Bob Altman
Hi all,
I'm looking for a way to enumerate the MAC addresses of all of "live" NICs
on my computer. I can enumerate all of the "live" IP addresses like this:
Dns.GetHostByName(Dns.GetHostName).AddressList
but I don't know how to get the associated MAC addresses.
Here's the problem I'm actually trying to solve: When my app runs, I want
it to always talk to the same network wire, even if the host IP address on
that wire changes. My solution is to enumerate the network connections
(using code like that shown above) when the app starts. If there are more
than one connection then I would prompt the user for the connection to use,
and I would remember the MAC address so that I don't need to bother the user
the next the app is run (even if DHCP gives the computer a new IP address).
TIA!
- Bob
I'm looking for a way to enumerate the MAC addresses of all of "live" NICs
on my computer. I can enumerate all of the "live" IP addresses like this:
Dns.GetHostByName(Dns.GetHostName).AddressList
but I don't know how to get the associated MAC addresses.
Here's the problem I'm actually trying to solve: When my app runs, I want
it to always talk to the same network wire, even if the host IP address on
that wire changes. My solution is to enumerate the network connections
(using code like that shown above) when the app starts. If there are more
than one connection then I would prompt the user for the connection to use,
and I would remember the MAC address so that I don't need to bother the user
the next the app is run (even if DHCP gives the computer a new IP address).
TIA!
- Bob