You are not using correctly the API. The Guid should match a registered DirectInput Joystick Guid. Check more carefully the sample JoystickApp that is dealing exactly with this.
Class not registered errors with sharpDX
Question
I'm trying some sharpDX examples and I;m getting this "Class not registered". I figure from the error its an os thing but I dont see why? I have installed the DX run-time as mentioned n the sharpDX page and I'm using windows7 64. This is a win32 app though.
error
An unhandled exception of type 'SharpDX.SharpDXException' occurred in SharpDX.dll
Additional information: HRESULT: [0x80040154], Module: [SharpDX.DirectInput], ApiCode: [DIERR_DEVICENOTREG/DeviceNotRegistered], Message: Class not registered
stack
SharpDX.dll!SharpDX.Result.CheckError() + 0x42 bytes
SharpDX.DirectInput.dll!SharpDX.DirectInput.DirectInput.CreateDevice(System.Guid arg0, out System.IntPtr arg1, SharpDX.ComObject arg2) + 0xee bytes
SharpDX.DirectInput.dll!SharpDX.DirectInput.Device.Device(SharpDX.DirectInput.DirectInput directInput, System.Guid deviceGuid) + 0x52 bytes
SharpDX.DirectInput.dll!SharpDX.DirectInput.CustomDevice<SharpDX.DirectInput.JoystickState,SharpDX.DirectInput.RawJoystickState,SharpDX.DirectInput.JoystickUpdate>.CustomDevice(SharpDX.DirectInput.DirectInput directInput, System.Guid deviceGuid) + 0x68 bytes
SharpDX.DirectInput.dll!SharpDX.DirectInput.Joystick.Joystick(SharpDX.DirectInput.DirectInput directInput, System.Guid deviceGuid) + 0x40 bytes
Code: joystickState = new JoystickState(); Guid foundDevice = new Guid(); joystick = new Joystick(directInput, foundDevice);
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow