How can I get Directx Joystick ID of USB Joystick.

Discussion in 'Windows Vista Drivers' started by kaichire, Dec 25, 2008.

  1. kaichire

    kaichire Guest

    hello.

    If two same USB HID joystick is connected at the same time.
    How can I get Directx Joystick ID from USB HID Joystick instance?
    I want to know what HID instance is 1P or 2P.

    I expected next API can get Joystick ID or some relation(something like
    pointer) with DirectX joystick.
    But I can know nothing about DirectX joystick.

    HidD_GetPreparsedData(Handle, &Ppd);
    HidP_GetCaps (Ppd, &Caps);

    Caps.NumberFeatureButtonCaps
    Caps.NumberFeatureValueCaps
    .....
    Values of two USB HID joystick is same
    (Caps.reserved is different but I can not know what it means)

    I want to know which USB HID joystick is which DirectX joystick.
    (or the DirectX joystick ID of USB HID joystick)

    -----------------------------
    Or I can know DirectX joystick ID next DirectX API

    g_Joystick[*pJoyCount].pJoystick->GetProperty(DIPROP_JOYSTICKID,&dipdw.diph);
    g_Joystick[*pJoyCount].dwID = dipdw.dwData;

    Can I know the pointer of USB HID joystick instance with DirectInput API?
     
    kaichire, Dec 25, 2008
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.