Hi there,
Is there any way to disable a system device from VB.NET.
Basically emulating when you go to Device Manager and disable a device that way?
I am assuming there is a WinAPI function that I can invoke, but I don't know which one it is?
The reason I need to do this is that I need to disable and straight after enable the device again.
Thanks.
EDIT: There are two API calls that I came across, but a quick google on them doesn't give me alot...I don't know how to call them :s:
1. SetupDiRestartDevices
2. SetupDiChangeState
Quick read on the second one tells me that it is not what I want as it does not disable the device until you reset, I need to be able to disable and enable the device dynamically.
Is there any way to disable a system device from VB.NET.
Basically emulating when you go to Device Manager and disable a device that way?
I am assuming there is a WinAPI function that I can invoke, but I don't know which one it is?
The reason I need to do this is that I need to disable and straight after enable the device again.
Thanks.
EDIT: There are two API calls that I came across, but a quick google on them doesn't give me alot...I don't know how to call them :s:
1. SetupDiRestartDevices
2. SetupDiChangeState
Quick read on the second one tells me that it is not what I want as it does not disable the device until you reset, I need to be able to disable and enable the device dynamically.
Last edited: