如何取得USb的VID PID?

eofhelloworld 2006-07-11 06:49:27
如何取得USb的VID PID?
...全文
549 3 打赏 收藏 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
andyzhu9 2006-07-27
  • 打赏
  • 举报
回复
用下面这个API就可以了,MSDN描述如下:

HidD_GetAttributes
The HidD_GetAttributes routine returns the attributes of a specified top-level collection.
BOOLEAN
HidD_GetAttributes(
IN HANDLE HidDeviceObject,
OUT PHIDD_ATTRIBUTES Attributes
);


Parameters
HidDeviceObject
Specifies an open handle to a top-level collection.
Attributes
Pointer to a caller-allocated HIDD_ATTRIBUTES structure that returns the attributes of the collection specified by HidDeviceObject.

Return Value
HidD_GetAttributes returns TRUE if succeeds; otherwise, it returns FALSE.

Headers
Declared in hidsdi.h. Include hidsdi.h.

Comments
Only user-mode applications can call HidD_GetAttributes. Kernel-mode drivers can use IOCTL_HID_GET_COLLECTION_INFORMATION.

For more information, see HID Concepts, HID Collections, and Operating HID Collections.
Featured 2006-07-24
  • 打赏
  • 举报
回复
看一下UsbView的代码,这些简单问题就全明白了
会思考的草 2006-07-16
  • 打赏
  • 举报
回复
读注册表。

2,644

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧