Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to get network interface name like "Ethernet", "Wireless network connection", "Hamachi" etc. Something like windows command netsh interface show interface does.

What I have tried:

I tried Windows functions like:
C++
GetAdaptersInfo()
GetInterfaceInfo()

from iphlpapi.h, but none returned the names I actually need.
Posted
Updated 18-May-16 10:09am
v2

1 solution

Possibly the Description field or FriendlyName field of the IP_ADAPTER_ADDRESSES structures returned by the the GetAdaptersAddresses function [^]?
 
Share this answer
 
Comments
Cansisti 18-May-16 16:17pm    
Gonna check it, thanks!
Cansisti 18-May-16 17:27pm    
I got strange error, it says GetAdaptersAddresses() was not declared (I'm including winsock2.h and iphlpapi.h)
jeron1 18-May-16 17:43pm    
Do you see it in iphlpapi.h? Have you tried Rebuid All?
Cansisti 18-May-16 18:14pm    
It's not declared in iphlpapi.h
jeron1 19-May-16 9:53am    
Hmm, mine has it, see if you can download a different (maybe newer) version.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900