Lukas
Lukas

Reputation: 886

Windows: Programmatically retrieve manually configured IPv6 address

I can retrieve the manually configured IPv4 Address of a Network Adapter (including disabled ones) by reading the IPAddress value from the following registry key

SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{Adapter-Guid}

Is there a similar way to retrieve the IPv6 address? Or do you have any other suggestion to get the manually configured IPv6 address in code?

Upvotes: 0

Views: 485

Answers (1)

Andrew Komiagin
Andrew Komiagin

Reputation: 6556

Please don't read system settings directly from Registry. You will end up having compatibility issues as the configuration/settings location(s) could be different on different versions of OS. Use GetAdaptersAddresses() API function on Windows to do that.

Upvotes: 1

Related Questions