Rich Tebb

I'm trying to use IDirectInputJoyConfig8 to configure joystick settings on a joystick device I've written a driver for. My intention is to integrate with the control panel and provide custom test/calibration property sheets for the joystick.

I'd like to use the IDirectInputJoyConfig8 interface to set the DIJOYTYPEINFO.clsidConfig and .dwFlags2 values by using the SetTypeInfo method. However, when I call Acquire(), I get an E_FAIL result, which is both undocumented (as a return code from Acquire) and not very helpful.

I'm toying with the idea of abandoning doing things 'the right way' and just writing registry values to REGSTR_PATH_JOYOEM. I can set the clsidConfig this way, but I don't know about the dwFlags2 (I want to set JOYTYPE_MOUSEHIDE | JOYTYPE_KEYBHIDE to hide some spurious HID devices that are created by the device's HID descriptor).

So I've got a couple of related questions:

  1. Does anyone have any idea what might cause Acquire() to return E_FAIL Or how I can get more diagnostic information about the return code
  2. Does anyone know how to achieve the desired mouse/keyboard hiding without using the SetTypeInfo API Are these flags stored in the registry somewhere

Thanks in advance for any help.



Re: Game Technologies: General Anyone using IDirectInputJoyConfig8?

Inaki Ayucar

Have you set the DataFormat for the device. ItĄŻs one of the usual causes of Acquire returning E_FAIL.

Check the setDataFormat() method.






Re: Game Technologies: General Anyone using IDirectInputJoyConfig8?

Rich Tebb

Thanks for your response. My post was referring to the Acquire() in IDirectInputJoyConfig8 (I didn't make this very clear) - do I also need to acquire the device itself in order to update the type configuration



Re: Game Technologies: General Anyone using IDirectInputJoyConfig8?

Inaki Ayucar

Sorry, Rich, didnt understand.

No I donĄŻt think so. In fact, I think you should unacquire() the device to be to update the type configuration calling IDirectInputJoyConfig8.Acquire(). But IĄŻm no expert on this.

Good luck !