Force Feedback not working with October SDK and managed code

Hi,

I am trying to get the force feedback feature to work with VB.Net but not able to do so. Basic features work fine. The C# sample provided with the DirectX9 doesnt seem to work. I am using Logitech WingMan Cordless Rumblepad 2.4 GHz and am getting an error on a particular line of the sample (code on this link: http://msdn.microsoft.com/archive/default.asp url=/archive/en-us/directx9_m_Oct_2004/directx/input/directinput_forcefeedback.asp)

        // Create the effect, using the passed in guid.
        eo = new EffectObject(ei.EffectGuid, e, joystick);

The error states something in the lines of... the value is outside the expected range. 

I've searched the web for many days now but havent found a working sample yet. I'll really really appreciate help from anyone who can get forcefeedback to work with .Net (VB.Net or C#).

Thanks,
Raza



Answer this question

Force Feedback not working with October SDK and managed code

  • dmkp231

    Still same problem here with October 2006 release.

    Isn't there any hotfix to this issue


  • Leo Mathew

    There seems to be an error (or two) in the example code.

    http://graphicdna.blogspot.com/2007/01/managed-directinput-samples-bugs.html

    hase the answer.

  • Eric Harmon

    Hi -

    Apologies for the delay. Our development team should be fixing this error in a future SDK release. Thanks for reporting it.

    Sherri

  • Voodoo45

    Hi - We are able to reproduce this issue. This is going to require further investigation from our Development Team. We should have additional status on this issue within the next week.

    Thanks -
    Sherri


  • KonRi

    Hi Raza -

    Our development team is investigating this issue. I'll provide an update shortly.

    Thanks -
    Sherri

  • Damir Dobric

    Hi,
    I have downloaded the latest Aug 2006 DirectX SDK.
    I had the similar problem with the force feedback using C#.

    It will throw an exception at the following line:
    // Create the effect, using the passed in guid.
    eo = new EffectObject(ei.EffectGuid, e, joystick);

    error msg is similar to the one reported above.:
    "value is outside the expected range"

    The bin sample in the managed SDK did not work too. but the C++ one does work.

  • GunaChinna

    I was trying to make a managed DirectInput program for my Xbox controllers (using the XBCDriver). I'm also getting that argument exception.
    I tried using the newer DirectInput classes from the new DirectX assembly of 2006 but that did not help either.

    Then I enabled debug output and discovered some errors:
    * DINPUT8: HidP_GetValueCaps Logical Min >= Logical Max -  
    * DINPUT8: HidP_GetValueCaps Physical Min/Max(0/-1) is bad setting all to zero to 1device may have bad firmware
    * DINPUT8: ERROR IDirectInputEffect::SetParameters: arg 1: DIEFFECT.cAxes = 0 is invalid
    I don't know exactly what it means but it might be the input driver.

    Also, I saw there was a managed FF example in the newer SDK (Managed\DirectInput\Feedback) but it gave me "No force feedback devices found attached to the system. Sample will now exit.". I also saw "ForceFeeback" in that sourcecode which seems to be a typo to me :)

  • Force Feedback not working with October SDK and managed code