Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Force Feedback: Class not registered error #43

@he1y13

Description

@he1y13

Hi,

Currently trying to provide force feedback on a G25 steering wheel. I am using a modified version of the Joystick app available here. I am getting this error

HRESULT: [0x80040154], Module: [SharpDX.DirectInput], ApiCode: [DIERR_DEVICENOTREG/DeviceNotRegistered], Message: Class not registered

at Effect e = when running the following code.

          var ep = new EffectParameters();
          var CF = new ConstantForce();
          var joystick = new Joystick(directInput, joystickGuid);
          joystick.SetCooperativeLevel(
                FormHandle,
                CooperativeLevel.Exclusive | CooperativeLevel.Background);

            ep = new EffectParameters();
            ep.Flags = EffectFlags.Cartesian | EffectFlags.ObjectOffsets;
            ep.Directions = new int[1] { 0 };
            ep.Gain = 5000;
            ep.Duration = int.MaxValue;
            ep.SamplePeriod = joystick.Capabilities.ForceFeedbackSamplePeriod;
            CF = new ConstantForce();
            CF.Magnitude = 10000;
            ep.Parameters = CF;

            Effect e = new Effect(joystick, joystickGuid, ep);
            e.Start();

If anyone have had similar issues, or sample code providing constant force to a G25 wheel please let me know! Any assistance is greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions