Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.7 KiB

  1. #ifndef __IDirectInputEffectDriver_H__
  2. #define __IDirectInputEffectDriver_H__
  3. #include <windows.h>
  4. #include <unknwn.h>
  5. #include <dinput.h>
  6. #include "dinputd.h"
  7. extern "C"
  8. {
  9. #include <hidsdi.h>
  10. }
  11. #include <crtdbg.h>
  12. #include "..\ControlItemCollection\Dualmode.h"
  13. #include "..\ControlItemCollection\Actions.h" // FORCE_BLOCK
  14. // class IDirectInputEffectDriver;
  15. //class CIDirectInputEffectDriver : public IUnknown
  16. class CIDirectInputEffectDriver
  17. {
  18. public:
  19. CIDirectInputEffectDriver(IDirectInputEffectDriver* pIPIDEffectDriver, IClassFactory* pIPIDClassFactory);
  20. ~CIDirectInputEffectDriver();
  21. //IUnknown members
  22. virtual HRESULT __stdcall QueryInterface(REFIID refiid, void** ppvObject);
  23. virtual ULONG __stdcall AddRef();
  24. virtual ULONG __stdcall Release();
  25. //IDirectInputEffectDriver
  26. virtual HRESULT __stdcall DeviceID(DWORD dwDIVersion, DWORD dwExternalID, DWORD dwIsBegining,
  27. DWORD dwInternalID, void* pReserved);
  28. virtual HRESULT __stdcall GetVersions(DIDRIVERVERSIONS* pDriverVersions);
  29. virtual HRESULT __stdcall Escape(DWORD dwDeviceID, DWORD dwEffectID, DIEFFESCAPE* pEscape);
  30. virtual HRESULT __stdcall SetGain(DWORD dwDeviceID, DWORD dwGain);
  31. virtual HRESULT __stdcall SendForceFeedbackCommand(DWORD dwDeviceID, DWORD dwState);
  32. virtual HRESULT __stdcall GetForceFeedbackState(DWORD dwDeviceID, DIDEVICESTATE* pDeviceState);
  33. virtual HRESULT __stdcall DownloadEffect(DWORD dwDeviceID, DWORD dwInternalEffectType,
  34. DWORD* pdwDnloadID, DIEFFECT* pEffect, DWORD dwFlags);
  35. virtual HRESULT __stdcall DestroyEffect(DWORD dwDeviceID, DWORD dwDnloadID);
  36. virtual HRESULT __stdcall StartEffect(DWORD dwDeviceID, DWORD dwDnloadID, DWORD dwMode, DWORD dwIterations);
  37. virtual HRESULT __stdcall StopEffect(DWORD dwDeviceID, DWORD dwDnloadID);
  38. virtual HRESULT __stdcall GetEffectStatus(DWORD dwDeviceID, DWORD dwDnloadID, DWORD* pdwStatusCode);
  39. void WaitForForceSchemeChange();
  40. private:
  41. void InitHidInformation(LPDIHIDFFINITINFO pHIDInitInfo);
  42. void SendSpringChange();
  43. DWORD m_dwDIVersion;
  44. DWORD m_dwExternalDeviceID;
  45. DWORD m_dwInternalDeviceID;
  46. ULONG m_ulReferenceCount;
  47. IDirectInputEffectDriver* m_pIPIDEffectDriver;
  48. IClassFactory* m_pIPIDClassFactory;
  49. HANDLE m_hKernelDeviceDriver;
  50. HANDLE m_hKernelDeviceDriverDuplicate;
  51. HANDLE m_hHidDeviceDriver;
  52. DWORD m_dwGcKernelDevice;
  53. HANDLE m_hForceSchemeChangeWaitThread;
  54. DWORD m_dwForceSchemeChangeThreadID;
  55. FORCE_BLOCK m_ForceMapping;
  56. PHIDP_PREPARSED_DATA m_pPreparsedData;
  57. HIDD_ATTRIBUTES m_HidAttributes;
  58. HIDP_CAPS m_HidCaps;
  59. };
  60. extern CIDirectInputEffectDriver* g_IEffectDriverObject;
  61. #endif __IDirectInputEffectDriver_H__