How to enumerate all available network interfaces? [duplicate]
问题 This question already has an answer here : How to enumerate network adapters and get their MAC addresses in Win32 API C++? (1 answer) Closed 2 years ago . How to enumerate all network interfaces currently available on the computer (including virtual, non-connected, loopback etc)? I need to know their IP4/6, Mask, Gateway, DNS, WINS etc Language: C++, WinAPI System: Windows 2000 and higher (including Win7) 回答1: Have a look at http://www.codeproject.com/KB/IP/netcfg.aspx. It's a giant example