I'm looking to support a custom joystick device, and due to project requirements I can no longer use the DirectInput API. I've switched to using the "classic" Windows multimedia API (e.g. joyGetDevCaps and family), and it all works with one exception.
The DirectInput DeviceInstance had two fields, InstanceName and ProductName which returned the correct "custom" name of the device.
The corresponding joyGetDevCaps product name field, szPname, returns a generic "Microsoft PC-joystick driver".
In searching the registry on a system with the device installed, I found that there is a REG_SZ OEMName entry in this node that has the string I want:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\VID_07C0&PID_1128
There are two fields returned in the JOYCAPS, wMid (Manufacturer ID) and wPid (Product ID), which map to the two hex values in the keyname: wMid = 0x07c0, wPid = 0x1128.
Additionally, I can use the SetupDiEnumDeviceInfo API on GUID_DEVINTERFACE_HID and find a matching controller (although this step may not be necessary):
HID\VID_07C0&PID_1128&REV_1032, HID-compliant game controller
Question: Is there an API for enumerating the MediaProperties\PrivateProperties that I should be using, or is it "safe" to use this information and query the registry directly? If there's an API please answer with references and/or sample code! I can't find anything related.