Network Adaptro configured with ip address or not? How to check using vc++/Windows api?

466 Views Asked by At

Hi Could any one share about Network Adaptor configured with ip address or not eithor using dhcp or manual. How to check using vc++/Windows api?

1

There are 1 best solutions below

1
On

Use GetAdapterAddresses in the IP Helper section of Win32.

The GetAdaptersAddresses function retrieves the addresses associated with the adapters on the local computer.

This returns very detailed information, including DHCP/DNS settings for this adapter, in a list of IP_ADAPTER_ADDRESSES structures. The API is non-trivial to use so follow the docs carefully.