You could use the GetIpAddrTable function that's available in Iphlpapi.dll (Internet Protocol Helper API), but it will only work with Windows 98 and beyond (i.e. no Win95).
See MSDN.
If that's not acceptable, there are other hacks that you could try.
See MSDN.
If that's not acceptable, there are other hacks that you could try.