Discussion:
Enable/Disable NIC most portable way.
(too old to reply)
s***@mail.ru
2010-09-20 06:05:28 UTC
Permalink
Hello.

How do I enable (disable) NIC on windows via api. I need to use most
portable accross any versions of windows code.

Thank you.
Maxim S. Shatskih
2010-09-20 10:51:12 UTC
Permalink
Post by s***@mail.ru
How do I enable (disable) NIC on windows via api. I need to use most
portable accross any versions of windows code.
SetupDiCallClassInstaller with the proper DIF_xxx code.

Disables any device, NIC too. More so, the Network control panel UI uses the same stuff to disable the NIC as the Device Manager - i.e. SetupDiCallClassInstaller (probably mediated by INetCfg stuff).

See the DEVCON sample.
--
Maxim S. Shatskih
Windows DDK MVP
***@storagecraft.com
http://www.storagecraft.com
s***@mail.ru
2010-09-21 03:29:17 UTC
Permalink
Post by Maxim S. Shatskih
SetupDiCallClassInstaller with the proper DIF_xxx code.
Disables any device, NIC too. More so, the Network control panel UI
uses

Thanks. It works fine.

Loading...