I asked a question about accessing USB devices previously and
incorrectly stated my question. I'd like to know how I can obtain
information about USB devices using C# such as the USB VID/PID. What
is necessary for this?
Sorry for the incorrectly worded question.
Andy
> I asked a question about accessing USB devices previously and
> incorrectly stated my question. I'd like to know how I can obtain
> information about USB devices using C# such as the USB VID/PID. What
> is necessary for this?
USB devices and their properties can be enumerated with Setup apis
(USBView.c sample in DDK)
Christian,
Thanks. Sorry for the ignorance here, but I'm really very unfamiliar
with all things MS. Where is this DDK? Is it part of VS2008? In
what, or where, do I look?
Andy
Hi,
Did you try registry mining in the following registry keys:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB
Kellie.
Hi,
I think Christian is referring to the following article & setupDi
APIs:
http://msdn.microsoft.com/en-us/library/cc526325.aspx
http://msdn.microsoft.com/en-us/library/ms791137.aspx
http://msdn.microsoft.com/en-us/library/ms792967.aspx
Kellie.
[ ...
> Thanks. Sorry for the ignorance here, but I'm really very unfamiliar
> with all things MS. Where is this DDK? Is it part of VS2008? In
> what, or where, do I look?
http://www.microsoft.com/whdc/devtools/ddk/default.mspx
--
Later,
Jerry.
The universe is a figment of its own imagination.
Everyone, thanks for your help. I'm almost afraid to ask but because
of the answers I'm getting here, is there no way to get information
like VID/PID from outside the DDK (meaning libraries that would be
part of Visual Studio)?
Andy
> Everyone, thanks for your help. I'm almost afraid to ask but because
> of the answers I'm getting here, is there no way to get information
> like VID/PID from outside the DDK (meaning libraries that would be
> part of Visual Studio)?
Setup apis used by USBView.c are not part of DDK (WDK). It's just the
sample that MS put there
They are User mode apis
[ ... ]
> Everyone, thanks for your help. I'm almost afraid to ask but because
> of the answers I'm getting here, is there no way to get information
> like VID/PID from outside the DDK (meaning libraries that would be
> part of Visual Studio)?
In theory, you were on the right track with WMI -- CIM_USBDEvice defines
a GetDescriptor method that would let you retrieve that data.
Unfortunately, while Microsoft has a matching GetDescriptor method for
Win32_USBHub, they don't appear to have anything similar for any USB
devices other than hubs...