Getting Network Interface Name using IP Helper or similar library
Posted on 2003-03-23
I am trying to get the "friendly" interface names for the network interfaces on a windows machine. What I need is exactly the list of names that are in the "Network and Dial-up Connections" control panel. I have tried getting the information from the IP_ADAPTER_INFO and MIB_IFROW structures but neither of these provide the name I need. I can get at the name of the physical device but not the "friendly" name. There is a field in the MIB_IFROW that doesn't seem to work properly that may be exactly what I'm looking for. It is the MIB_IFROW.wszName field. I always get this field always containing 0s, NULL value. Is there some trick to using this? I'm using windows 2000 but this also needs to run on XP and CE in the future. Is there some other library similar to IP Helper that has a function in it to get this data that I should use? Do I need to get the name differently for normal connections versus Dial up network connections, for example using MprXxx or RasXxx functions? PS, this is my first time on this site, what are the ways I can get more points.