Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:02:28+00:00 2026-06-13T05:02:28+00:00

I’ve got a curious problem with SlimDX: we’ve seen this on Windows 7, and

  • 0

I’ve got a curious problem with SlimDX: we’ve seen this on Windows 7, and haven’t yet tested other versions: I’m using a bundle of cheap USB gamepads (no serial number), and sometimes one physical gamepad ends up providing the input to more than one Joystick object.

The scenario is:

  1. Plug in gamepad 1 to hub slot 1. Pad appears in DirectInput.GetDevices as GUID f17b2d30. Create Joystick object for pad.
  2. Plug in gamepad 2 to hub slot 2. Pad appears in DirectInput.GetDevices as GUID 5187d2d0. Create Joystick object for pad.
  3. Press a button on gamepad 2. No change to state.
  4. Press a button on gamepad 1. Button appears set in GetCurrentState() after Poll() on both objects.
  5. Unplug gamepad 2. Poll() method on its object continues to return without error, but it no longer appears in DirectInput.GetDevices.
  6. Press a button on gamepad 1. Button appears set in GetCurrentState() after Poll() on both objects.

I’ve examined the objects in the debugger. Each Joystick references the correct GUID by Information.InstanceGUID, but each has the same USB path in Properties.InterfacePath.

The gamepad hardware seems to be working correctly – If I perform the same sequence with the control panel joystick tester the gamepads remain distinct.

The DirectInput GUIDs seem to be allocated based on the USB PID and VID, then the order the identical gamepads are plugged in, rather than the physical path to USB port they’re plugged in to. If I mix different models of gamepad, the problem goes away.

It feels like a SlimDX or even a DirectInput bug – is there a workaround for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:02:29+00:00Added an answer on June 13, 2026 at 5:02 am

    My final answer here was to drop DirectInput altogether, and move to RawInput. I implemented a small C DLL to interface between my C# code and RawInput.

    I’ve had two limitations: trouble finding device names, and a crash reading device information under XP. Neither of these are a critical problem for my application.

    Sample C++ source code is a bit long to fit in an answer, so is here.

    Calling from C# uses these signatures:

        [DllImport("Adapters.dll", CallingConvention = CallingConvention.Cdecl)]
        private static extern int InitialiseGamepads(IntPtr hwnd);
        [DllImport("Adapters.dll", CallingConvention = CallingConvention.Cdecl)]
        private static extern IntPtr GetDevicePath(int index);
        [DllImport("Adapters.dll", CallingConvention = CallingConvention.Cdecl)]
        private static extern int PollDeviceChange();
        [DllImport("Adapters.dll", CallingConvention = CallingConvention.Cdecl)]
        private static extern int ProcessInput(IntPtr wParam, IntPtr lParam,
            out byte buttons, out int x, out int y);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.