2014-02-22 13 views
0

sharpDX 예제를 사용하려고하는데이 클래스를 등록하지 않았습니다. 나는 오류에서 그 os 일을 그림하지만 나는 이유를 보지 못하니? sharpDX 페이지에서 언급 한 DX 실행 시간을 설치했고 windows7 64를 사용하고 있습니다.이 방법은 win32 앱입니다.클래스가 sharpDX로 등록되지 않았습니다.

오류

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 

코드 : joystickState = 새로운 JoystickState(); Guid foundDevice = new Guid(); 조이스틱 = 새로운 조이스틱 (directInput, foundDevice);

답변

-1

API가 올바르게 사용되지 않습니다. Guid는 등록 된 DirectInput Joystick Guid와 일치해야합니다. 이 부분을 정확하게 다루는 샘플 JoystickApp을주의 깊게 확인하십시오.

+0

그 시험은 많은 도움을주었습니다. – user2144480

+0

링크가 깨졌습니다 .... –

관련 문제