I am trying to disable portable device using setupdixxx APIs and device is getting blocked and no device content is visible. I want device to be in disable state and no content should be visible. But its content is getting visible when I try to enable it from device manager.
Here is my pseudo code.
- Enumerate portable devices, [Device state: Enable] if it is connected, disable it. [Device state: Disable]
- If manual intervention is detected, [Device state: Enable] disable it again. [Device state: Disable][Reboot required to change this state]
The last Disable is not happening properly as system requires a reboot. In this case, its contents are getting visible.
Is there any way to avoid this.. I dont want its contents to be visible.
or Is there any way to restrict user from enabling device from device manager??
Thanks in advance.