DIDEVICEINSTANCE guidInstance和guidProduct在同一设备上更改 [英] DIDEVICEINSTANCE guidInstance and guidProduct change on same device

查看:165
本文介绍了DIDEVICEINSTANCE guidInstance和guidProduct在同一设备上更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在工作中的项目中使用DirectInput8,该项目监视着PC的各个组件。为了监视操纵杆,我们使用DirectInput8。通过枚举所有操纵杆(类型为DI8DEVCLASS_GAMECTRL且标志为DIEDFL_ATTACHEDONLY)来检索数据。最近,引起我注意的是,我们正在出现多个操纵杆。首先,我查看了两次重新启动之间存储组件的xml文件。操纵杆有两个条目,即Logitech Extreme 3d pro,每个条目都有一个独特的产品guid。我备份并删除了文件,从而有效地迫使我在重新启动计算机后下次启动应用程序时重新扫描计算机。我能够发生相同的问题,并注销了向导,但每个向导都不相同。该系统仅插入了一个操纵杆,但是通过USB集线器插入。集线器是否正在影响我所看到的引导?我也只能使这种情况发生5次尝试中的1次。



示例:



操纵杆产品GUID:3C6A972000000000504944564944
游戏杆实例GUID:3C6A972097C11E3800144455354



操纵杆产品GUID:DA83AFB000000000504944564944
游戏杆实例GUID:DA83AFB0D7B211E2800144455354

解决方案

很难找到它,但是在查看了我们的测试人员后,我发现他们正在登录多个用户帐户,并且每个用户返回的GUID有所不同,这就是造成此问题的原因,如果文档会进行更新以反映这一点,那就很好了。 p>

I am using DirectInput8 in a project at work that monitors various components of the pc. To monitor joysticks we use DirectInput8. The data is retrieved by enumerating all joysticks with DI8DEVCLASS_GAMECTRL as the type and DIEDFL_ATTACHEDONLY as a flag. Recently it was brought to my attention that we were having multiple joysticks showing up. First I looked at the xml file we store the components in between reboots. There were two entries for the joysticks, Logitech Extreme 3d pro, and each had a unique product guid. I backed the file up and removed it, effectively forcing a rescan of the machine next time the app started after I rebooted the machine. I was able to get the same problem to occur and logged out the guids and they are different for each. The system only has a single joystick plugged in however it plugs in through a usb hub. Is the hub affecting the guids I am seeing? I could also only get this to occur maybe 1 out of 5 attempts.

Example:

Joystick Product GUID: 3C6A972000000000504944564944 Joystick Instance GUID: 3C6A972097C11E3800144455354

Joystick Product GUID: DA83AFB000000000504944564944 Joystick Instance GUID: DA83AFB0D7B211E2800144455354

解决方案

This was a pain to find but after watching our testers I found they were logging into multiple user accounts and the GUID returned was different per user which is what caused the problem, would be nice if the documentation would be updated to reflect this.

这篇关于DIDEVICEINSTANCE guidInstance和guidProduct在同一设备上更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆