The iteration is already done for you in IDirectInputWImpl_EnumDevices . You only need to probe for the specified device in joydev_enum_deviceW where id is the index of the device being probed ("/dev/input/event%d", id). Pass the id to joydev_have(). Look at the linux_input code to see how it is done.