Hello,
I need to disable the connection to USB port storage, network and other devices excluding the smart card reader devices.
What is easiest way?
Maybe I can use UsbView from WDK to recognize the new connected device and
then send IOCTL to disable the device. I do not know exactly that IOCTL should be sent
for this purpose.
Should I write a class or a bus filter USB driver, or is there another solution?
Any advice would be greatly appreciated.
Best regards
Mark
Mark Shnaider
R&D Team Leader
Office: +972.3.927.543tel: Mobile: +972.54.2448.543tel: Email: xxxxx@arx.commailto:xxxxx</mailto:xxxxx></tel:></tel:>
You may filter the query request by modifying device descriptor in enumeration phase, you’ll need a driver to do this, or just disable the device after it get enumerated, can be performed in user application.
Thanks for your advices,
If I understand correctly I need write usb bus filter driver to filter the query request.
Please let me know, how can I disable device in user application.
(I do not know API for this purpose)
Best regards
Mark
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Monday, August 31, 2015 10:13
To: Windows System Software Devs Interest List Subject: RE:[ntdev] How to disable the connection to USB port storage, network and other devices ?
You may filter the query request by modifying device descriptor in enumeration phase, you’ll need a driver to do this, or just disable the device after it get enumerated, can be performed in user application.
@Mikae both of CM_Disable_DevNode and SetupDiCallClassInstaller seem to completely remove the device from device manager. However devcon creates the same effect like in right click and disable device (see photo). Do you have any idea why that happens?
My code for SetupDiCallClassInstaller: