device filtering support
Travis
libusbdotnet at gmail.com
Tue Feb 7 22:51:03 EST 2012
On 2/7/2012 4:42 PM, Segher Boessenkool wrote:
>> GUID -> VID:PID is easy, since the Windows API works with GUID.
>> VID:PID -> GUID is a bit more complex [ ... ]
>
> I have no idea about the actual interfaces you have to use,
> but...
>
At this point I don't know if we are talking about class GUIDs or device
interface GUIDs but getting the class guid given a VID:PID is certainly
possible. Getting the list of device interface guids given a VID:PID is
also possible.
> libusbx has to figure out what devices are there (it simply is
> part of our API, and it makes sense). You can get a list of
> the USB devices on your system pretty cheaply I would think
> (in whatever format)? Certainly without causing traffic on the
> USB?
Yes, but not in the form of descriptors. However, you could nearly
re-create the device descriptor with the information in the registry.
>
> And you can ask what is the VID/PID of any device you found,
> again without causing traffic, and cheaply?
>
Yes. ..as a bonus, windows also caches the serial number. ;)
Regards,
Travis
> That is all you need for filtering on VID/PID.
>
>
> Segher
>
>
> _______________________________________________
> libusbx mailing list
> libusbx at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libusbx
>
More information about the libusbx
mailing list