It might be even easier to just enumerate all present NICs via WMI and then retrieve the associated IP addresses and subnet masks for each NIC.
_________________________
There are two types of vessels, submarines and targets.