How to correlate "external joystick id" referenced in IDirectInputEffectDriver "DownloadEffect" function with a connected HID device

Andrew Snowden 20 Reputation points
2023-05-08T19:37:05.49+00:00

The documentation doesn't describe how to use the "external joystick id" that is referenced in the IDirectInputEffectDriver. I'm writing the driver to communicate with a force-feedback device I have created, and I need to be able to correlate to the HID device based on the passed-in joystick ID so that I can open it and send data to it. Any help is appreciated

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,826 questions
0 comments No comments
{count} votes

Accepted answer
  1. Limitless Technology 44,741 Reputation points
    2023-05-09T14:47:40.64+00:00

    Hello,

    for this you need to call the DINPUTD.H structure DIHIDFFINITINFO

    The DIHIDFFINITINFO structure is used by DirectInput to provide information to a HID force-feedback driver about the device it is being asked to control.

    https://learn.microsoft.com/en-us/windows/win32/api/dinputd/ns-dinputd-dihidffinitinfo

    --If the reply is helpful, please Upvote and Accept as answer--

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.