- API to Disable and Enable Network Adapter in Windows XP
- Posted by k_c_400@yahoo.com on July 2nd, 2005
Hi,
I've a problem for my USB wireless network adpater in my laptop
computer. Whenever the adapter losses connection to the ISP for
whatever reason, in order to establish a re-connection, I will have to
go into Device Manager, right-click on the adapter, then manually
disable and enable the network driver. Simply selecing the Repair
option from the network icon (on the system tray) context menu won't
work. After a while, this method is getting a bit tiresome. Can
someone let me what is the appropriate API that I can use to write a
simple program to do the same, i.e., disable and then enable the
network connect? Thanks in advanced.
- Posted by Kellie Fitton on July 2nd, 2005
Hello,
Well, If you have the Windows XP DDK (Device Driver Kit) installed on
your machine,
then, lookUp the samples sourceCode provided under directory
General\SetUp\Enable,
the sample programs are named Enable/Disable. You need some good
understanding
of drivers programming as well.
Hope these information helps.
Kellie.
- Posted by k_c_400@yahoo.com on July 3rd, 2005
Thanks,
I just find out that I can set up a batch file which use the Devcon.exe
to enable/disable the adapter. There's no need to go into DDK - I have
no access to it anyway.