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
Had a similar issue... I just exported the DirectInput registry settings for the VID/PIDs I wanted to replicate GUIDs across machines.
So, in regedit navigate to:
[HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\DirectInput\VID_[Whatever]&PID_[Whatever]\
Right click, choose Export to create the .reg file, the move it to the machine you want and double click.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With