本文介绍了Windows HID设备名称格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有多种方法可以检索HID设备的Windows设备名称,,其中RIDI_DEVICENAME是做到这一点的一种方法。

There are various ways to retrieve the Windows "Device Name" of a HID device, GetRawInputDeviceInfo with RIDI_DEVICENAME being one way to do it.

给出示例名称:

\?\HID#VID_FEED& PID_DEAD#6& 3559c8ea& 0& 0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd}

\?\HID#VID_FEED&PID_DEAD#6&3559c8ea&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd}

我想知道是否有任何文档说明此字符串的含义吗?

I'm wondering if there is any documentation whatsoever on what is what in this string?

\?\HID#VID_AAAA& PID_BBBB# C& DDDDDD& E& FFFF#{GUID}

\?\HID#VID_AAAA&PID_BBBB#C&DDDDDD&E&FFFF#{GUID}

因此,最明显的是最后的A(VID),B(PID)和GUID。我想知道的是C,D,E和F到底是什么?

So the obvious ones are A(VID), B(PID) and the GUID on the end. What I'm wondering is what EXACTLY are C, D, E and F?

即使您插入两个完全相同的HID设备,C和D似乎也是唯一的,这对我的问题来说非常有用,但是如果您这样做,我会感到更舒服我可以确切地知道如何根据每个操作系统确定它,或者至少它遵循某种已知格式。

It seems that C and D are unique even if you plug in two of the exact same HID devices which is great for my problem, but I'd feel more comfortable if I could know exactly how this is determined on a per OS basis, or at least that it follows some known format.

我一直在像疯子一样在谷歌上搜索这个数字出来,我错过了明显的东西吗?

I have been googling like a madman trying to figure this out, am I missing something obvious?

预先感谢

推荐答案

根据,该值表示唯一的设备实例ID:

According to a similar MSDN post, the value represents a unique device instance ID:

这篇关于Windows HID设备名称格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 06:37