I was unable to find a Win32 API to modify network interface properties. By "network interface properties" I mean properties, which can be set using the "network connections" panel in the System control panel manually or using "netsh interface" from the command line.
In particular, I want to modify:
- The network connection name (e.g. "Local Area Connection #2"
- The IPv4 network interface metric (which is "automatic" by default)
To identify the network adapter, I have a device instance ID of the PnP device manager (e.g. "ROOT\NET\0000"). I also have an instance of a SetupAPI SP_DEVINFO_DATA structure. I can probably also query the NetCfgInstanceId using SetupAPI.
Is there a Win32 API which does what I want? I don't want to use WMI. Target platforms are Windows 7 x64 or newer.