Click here to Skip to main content
15,894,180 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Good afternoon, I would like to restate my question better, I am a student computer, i want to create an application that can stops entering the to usb, for example when you put a usb stick to the port to be blocked the procedure for recognition, all I want to do in windows 7 / 8.1 using visual studio 2015. I have knowledge of c ++ im just lost in than to begin to create, and what libraries have to install in visual studio.

#How to Access a USB Device by Using WinUSB Functions
Posted
Updated 24-Nov-15 9:27am
v2
Comments
Sergey Alexandrovich Kryukov 24-Nov-15 15:16pm    
It depends...
—SA
ZurdoDev 24-Nov-15 15:28pm    
On?
Sergey Alexandrovich Kryukov 24-Nov-15 16:43pm    
On a number of factors. The device firmware can claim it's HID or other predefined-type USB device or not. It depends on functionality required, and so on.
—SA
chandanadhikari 24-Nov-15 23:44pm    
hi,
question is not clear to me but just a casual search revealed this MSDN link:
https://msdn.microsoft.com/en-in/library/windows/hardware/ff540174%28v=vs.85%29.aspx

at least this can get you started and if you are stuck again then you can post further questions here.

maybe this helps !

1 solution

I'm reading your question to mean you want to use the WinUSB API to block a removable media device like a USB thumb drive or flash memory stick.

The short answer is you can't. The class of driver(s) for these types of devices is not WinUSB. Understand that WinUSB is two parts - a kernel driver and a user DLL. If the USB device does not use the WinUSB kernel driver, the user DLL can't help you talk to the device.

What you ask for is really a configuration issue more than a programming exercise.

Disable USB Storage In Windows 8 / 7 [How-To Guide] | Redmond Pie[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900