问题
Is there any code or method to get the IP addresses of the local system?
回答1:
To enumerate local IP addresses, use the Win32 API GetAdaptersInfo() (supports IPv4 only) or GetAdaptersAddresses() (supports IPv4 and IPv6) function. C/C++ examples are included in their documentation.
来源:https://stackoverflow.com/questions/37902643/how-to-get-local-ip-address-of-windows-system