I found this article at SO that tells how to enable/disable a network adpter using the SetupAPI. This works fine so far. The problem is that I could not find a way to get the device index for network connections (adapters) that have been disabled in Windows XP.
I have:
- The list of GUIDs (from HKLM\SOFTWARE\Microsoft\Windows NT\Netcards)
- Everything from Win32_NetworkAadapter that is supported in Windows XP
I tried without success:
- GetIfTable() - disabled adapters are not present in the table
- Win32_NetworkAdapter::InterfaceIndex is not supported in XP
- Win32_NetworkAdapter::Enable()/Disable() is not supported in XP
What else can I do to obtain the device index or to get a disabled network adapter re-eabled again?