Mike -
I've been looking at the GetAdaptersAddresses WinAPI function over the past several evenings. I'm pretty sure it can be called from PB and I'm hoping to be able to do just that in the near future, but it's going to take a little time. There are 15 different WinAPI structures that have to be mimicked in PB just to be able to create the PB version of the IP_ADAPTER_ADDRESSES structure. I'm able to call it from a C++ console app and extract IPv6 addresses, so I know what has to be done, it's just a matter of persuading PB to do it.
In researching this issue, I looked at the Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration classes in WMI (Windows Management Instrumentation) and found IP addresses there.
So... I borrowed code from a CodeXchange sample program I wrote a while back on obtaining information from WMI, and this evening put together a little PB app that (1) identifies which network adapter in Windows is the active one, and (2) obtains the adapter name, MAC address, IPv4 address and IPv6 address of that active network adapter. I'm attaching the app for your perusal. If you can use it to satisfy your needs, great. If not, I'll re-post if and when I get the WinAPI function working in the (hopefully) not too distant future.
Caveat emptor: I've only run this app on my home PC, so I make no guarantees that it will work in all situations. Please let me know how it works out for you.
Best regards, John
Have you looked at Windows Management Instrumentation (WMI) to see if there is anything there that satisfies your requirements? In particular, instances of the various classes within the "Networking Device" class category? There's a sample PB app in CodeXchange to obtain/report on WMI information.
--
I use the internal ip address of the user (along with their external ip) to see if they are logged in more than one time on the same machine in order to provide them an option to kill off a possible powerserver orphan.