Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

USB API for Windows [closed]

Tags:

c++

c

windows

api

usb

Is there a standard API for USB devices on windows? I know classes will have an impact on them but I cant find a standard one/list at all?

like image 227
Display Name Avatar asked Aug 20 '12 10:08

Display Name


People also ask

What happens if I disable USB selective suspend?

This will completely disable Windows power management features for your USB ports, and hopefully resolve any sleep/power related issues you may be having with your USB devices.

Should I disable USB selective suspend?

USB selective suspend is enabled by default on all Windows devices. While we recommend leaving USB selective suspend enabled on your battery-powered computer, you should disable the feature if you're having USB-related troubles. Say, for instance, your USB drive stopped showing up in the File Explorer.


2 Answers

All USB devices has unique Pid, Vid. You can use generic library to interact with its end points for me I am using cypress library which has 2 versions for managed and unmanaged languages.

http://www.cypress.com/?rID=34870

Keep in mind the license for this library is free of charge if used with cypress powered devices only. But you can check it and use native APIs to achieve the same behavior but it supports some good features epically high speed transfer to bulk end points.

Also check this question Working with USB devices in .NET

like image 33
Mahmoud Fayez Avatar answered Sep 27 '22 18:09

Mahmoud Fayez


Yes there is.

Its called WinUSB - http://msdn.microsoft.com/en-us/library/windows/hardware/ff540196(v=vs.85).aspx

Sample WinUSB code found here - http://msdn.microsoft.com/en-us/library/windows/hardware/ff540174(v=vs.85).aspx

like image 193
Software_Designer Avatar answered Sep 27 '22 19:09

Software_Designer