dinput.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:222k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /****************************************************************************
  2.  *
  3.  *  Copyright (C) 1996-2000 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       dinput.h
  6.  *  Content:    DirectInput include file
  7.  *
  8.  ****************************************************************************/
  9. #ifndef __DINPUT_INCLUDED__
  10. #define __DINPUT_INCLUDED__
  11. #ifndef DIJ_RINGZERO
  12. #ifdef _WIN32
  13. #define COM_NO_WINDOWS_H
  14. #include <objbase.h>
  15. #endif
  16. #endif /* DIJ_RINGZERO */
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /*
  21.  *  To build applications for older versions of DirectInput
  22.  *
  23.  *  #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ]
  24.  *
  25.  *  before #include <dinput.h>.  By default, #include <dinput.h>
  26.  *  will produce a DirectX 8-compatible header file.
  27.  *
  28.  */
  29. #define DIRECTINPUT_HEADER_VERSION  0x0800
  30. #ifndef DIRECTINPUT_VERSION
  31. #define DIRECTINPUT_VERSION         DIRECTINPUT_HEADER_VERSION
  32. #pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
  33. #endif
  34. #ifndef DIJ_RINGZERO
  35. /****************************************************************************
  36.  *
  37.  *      Class IDs
  38.  *
  39.  ****************************************************************************/
  40. DEFINE_GUID(CLSID_DirectInput,       0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  41. DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  42. DEFINE_GUID(CLSID_DirectInput8,      0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  43. DEFINE_GUID(CLSID_DirectInputDevice8,0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  44. /****************************************************************************
  45.  *
  46.  *      Interfaces
  47.  *
  48.  ****************************************************************************/
  49. DEFINE_GUID(IID_IDirectInputA,     0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  50. DEFINE_GUID(IID_IDirectInputW,     0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  51. DEFINE_GUID(IID_IDirectInput2A,    0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  52. DEFINE_GUID(IID_IDirectInput2W,    0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  53. DEFINE_GUID(IID_IDirectInput7A,    0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  54. DEFINE_GUID(IID_IDirectInput7W,    0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  55. DEFINE_GUID(IID_IDirectInput8A,    0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
  56. DEFINE_GUID(IID_IDirectInput8W,    0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
  57. DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  58. DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  59. DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  60. DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  61. DEFINE_GUID(IID_IDirectInputDevice7A,0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  62. DEFINE_GUID(IID_IDirectInputDevice7W,0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  63. DEFINE_GUID(IID_IDirectInputDevice8A,0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
  64. DEFINE_GUID(IID_IDirectInputDevice8W,0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
  65. DEFINE_GUID(IID_IDirectInputEffect,  0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  66. /****************************************************************************
  67.  *
  68.  *      Predefined object types
  69.  *
  70.  ****************************************************************************/
  71. DEFINE_GUID(GUID_XAxis,   0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  72. DEFINE_GUID(GUID_YAxis,   0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  73. DEFINE_GUID(GUID_ZAxis,   0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  74. DEFINE_GUID(GUID_RxAxis,  0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  75. DEFINE_GUID(GUID_RyAxis,  0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  76. DEFINE_GUID(GUID_RzAxis,  0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  77. DEFINE_GUID(GUID_Slider,  0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  78. DEFINE_GUID(GUID_Button,  0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  79. DEFINE_GUID(GUID_Key,     0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  80. DEFINE_GUID(GUID_POV,     0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  81. DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  82. /****************************************************************************
  83.  *
  84.  *      Predefined product GUIDs
  85.  *
  86.  ****************************************************************************/
  87. DEFINE_GUID(GUID_SysMouse,   0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  88. DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  89. DEFINE_GUID(GUID_Joystick   ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  90. DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  91. DEFINE_GUID(GUID_SysMouseEm2,0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  92. DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  93. DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  94. /****************************************************************************
  95.  *
  96.  *      Predefined force feedback effects
  97.  *
  98.  ****************************************************************************/
  99. DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  100. DEFINE_GUID(GUID_RampForce,     0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  101. DEFINE_GUID(GUID_Square,        0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  102. DEFINE_GUID(GUID_Sine,          0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  103. DEFINE_GUID(GUID_Triangle,      0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  104. DEFINE_GUID(GUID_SawtoothUp,    0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  105. DEFINE_GUID(GUID_SawtoothDown,  0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  106. DEFINE_GUID(GUID_Spring,        0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  107. DEFINE_GUID(GUID_Damper,        0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  108. DEFINE_GUID(GUID_Inertia,       0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  109. DEFINE_GUID(GUID_Friction,      0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  110. DEFINE_GUID(GUID_CustomForce,   0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  111. #endif /* DIJ_RINGZERO */
  112. /****************************************************************************
  113.  *
  114.  *      Interfaces and Structures...
  115.  *
  116.  ****************************************************************************/
  117. #if(DIRECTINPUT_VERSION >= 0x0500)
  118. /****************************************************************************
  119.  *
  120.  *      IDirectInputEffect
  121.  *
  122.  ****************************************************************************/
  123. #define DIEFT_ALL                   0x00000000
  124. #define DIEFT_CONSTANTFORCE         0x00000001
  125. #define DIEFT_RAMPFORCE             0x00000002
  126. #define DIEFT_PERIODIC              0x00000003
  127. #define DIEFT_CONDITION             0x00000004
  128. #define DIEFT_CUSTOMFORCE           0x00000005
  129. #define DIEFT_HARDWARE              0x000000FF
  130. #define DIEFT_FFATTACK              0x00000200
  131. #define DIEFT_FFFADE                0x00000400
  132. #define DIEFT_SATURATION            0x00000800
  133. #define DIEFT_POSNEGCOEFFICIENTS    0x00001000
  134. #define DIEFT_POSNEGSATURATION      0x00002000
  135. #define DIEFT_DEADBAND              0x00004000
  136. #define DIEFT_STARTDELAY            0x00008000
  137. #define DIEFT_GETTYPE(n)            LOBYTE(n)
  138. #define DI_DEGREES                  100
  139. #define DI_FFNOMINALMAX             10000
  140. #define DI_SECONDS                  1000000
  141. typedef struct DICONSTANTFORCE {
  142.     LONG  lMagnitude;
  143. } DICONSTANTFORCE, *LPDICONSTANTFORCE;
  144. typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
  145. typedef struct DIRAMPFORCE {
  146.     LONG  lStart;
  147.     LONG  lEnd;
  148. } DIRAMPFORCE, *LPDIRAMPFORCE;
  149. typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
  150. typedef struct DIPERIODIC {
  151.     DWORD dwMagnitude;
  152.     LONG  lOffset;
  153.     DWORD dwPhase;
  154.     DWORD dwPeriod;
  155. } DIPERIODIC, *LPDIPERIODIC;
  156. typedef const DIPERIODIC *LPCDIPERIODIC;
  157. typedef struct DICONDITION {
  158.     LONG  lOffset;
  159.     LONG  lPositiveCoefficient;
  160.     LONG  lNegativeCoefficient;
  161.     DWORD dwPositiveSaturation;
  162.     DWORD dwNegativeSaturation;
  163.     LONG  lDeadBand;
  164. } DICONDITION, *LPDICONDITION;
  165. typedef const DICONDITION *LPCDICONDITION;
  166. typedef struct DICUSTOMFORCE {
  167.     DWORD cChannels;
  168.     DWORD dwSamplePeriod;
  169.     DWORD cSamples;
  170.     LPLONG rglForceData;
  171. } DICUSTOMFORCE, *LPDICUSTOMFORCE;
  172. typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
  173. typedef struct DIENVELOPE {
  174.     DWORD dwSize;                   /* sizeof(DIENVELOPE)   */
  175.     DWORD dwAttackLevel;
  176.     DWORD dwAttackTime;             /* Microseconds         */
  177.     DWORD dwFadeLevel;
  178.     DWORD dwFadeTime;               /* Microseconds         */
  179. } DIENVELOPE, *LPDIENVELOPE;
  180. typedef const DIENVELOPE *LPCDIENVELOPE;
  181. /* This structure is defined for DirectX 5.0 compatibility */
  182. typedef struct DIEFFECT_DX5 {
  183.     DWORD dwSize;                   /* sizeof(DIEFFECT_DX5) */
  184.     DWORD dwFlags;                  /* DIEFF_*              */
  185.     DWORD dwDuration;               /* Microseconds         */
  186.     DWORD dwSamplePeriod;           /* Microseconds         */
  187.     DWORD dwGain;
  188.     DWORD dwTriggerButton;          /* or DIEB_NOTRIGGER    */
  189.     DWORD dwTriggerRepeatInterval;  /* Microseconds         */
  190.     DWORD cAxes;                    /* Number of axes       */
  191.     LPDWORD rgdwAxes;               /* Array of axes        */
  192.     LPLONG rglDirection;            /* Array of directions  */
  193.     LPDIENVELOPE lpEnvelope;        /* Optional             */
  194.     DWORD cbTypeSpecificParams;     /* Size of params       */
  195.     LPVOID lpvTypeSpecificParams;   /* Pointer to params    */
  196. } DIEFFECT_DX5, *LPDIEFFECT_DX5;
  197. typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
  198. typedef struct DIEFFECT {
  199.     DWORD dwSize;                   /* sizeof(DIEFFECT)     */
  200.     DWORD dwFlags;                  /* DIEFF_*              */
  201.     DWORD dwDuration;               /* Microseconds         */
  202.     DWORD dwSamplePeriod;           /* Microseconds         */
  203.     DWORD dwGain;
  204.     DWORD dwTriggerButton;          /* or DIEB_NOTRIGGER    */
  205.     DWORD dwTriggerRepeatInterval;  /* Microseconds         */
  206.     DWORD cAxes;                    /* Number of axes       */
  207.     LPDWORD rgdwAxes;               /* Array of axes        */
  208.     LPLONG rglDirection;            /* Array of directions  */
  209.     LPDIENVELOPE lpEnvelope;        /* Optional             */
  210.     DWORD cbTypeSpecificParams;     /* Size of params       */
  211.     LPVOID lpvTypeSpecificParams;   /* Pointer to params    */
  212. #if(DIRECTINPUT_VERSION >= 0x0600)
  213.     DWORD  dwStartDelay;            /* Microseconds         */
  214. #endif /* DIRECTINPUT_VERSION >= 0x0600 */
  215. } DIEFFECT, *LPDIEFFECT;
  216. typedef DIEFFECT DIEFFECT_DX6;
  217. typedef LPDIEFFECT LPDIEFFECT_DX6;
  218. typedef const DIEFFECT *LPCDIEFFECT;
  219. #if(DIRECTINPUT_VERSION >= 0x0700)
  220. #ifndef DIJ_RINGZERO
  221. typedef struct DIFILEEFFECT{
  222.     DWORD       dwSize;
  223.     GUID        GuidEffect;
  224.     LPCDIEFFECT lpDiEffect;
  225.     CHAR        szFriendlyName[MAX_PATH];
  226. }DIFILEEFFECT, *LPDIFILEEFFECT;
  227. typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
  228. typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
  229. #endif /* DIJ_RINGZERO */
  230. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  231. #define DIEFF_OBJECTIDS             0x00000001
  232. #define DIEFF_OBJECTOFFSETS         0x00000002
  233. #define DIEFF_CARTESIAN             0x00000010
  234. #define DIEFF_POLAR                 0x00000020
  235. #define DIEFF_SPHERICAL             0x00000040
  236. #define DIEP_DURATION               0x00000001
  237. #define DIEP_SAMPLEPERIOD           0x00000002
  238. #define DIEP_GAIN                   0x00000004
  239. #define DIEP_TRIGGERBUTTON          0x00000008
  240. #define DIEP_TRIGGERREPEATINTERVAL  0x00000010
  241. #define DIEP_AXES                   0x00000020
  242. #define DIEP_DIRECTION              0x00000040
  243. #define DIEP_ENVELOPE               0x00000080
  244. #define DIEP_TYPESPECIFICPARAMS     0x00000100
  245. #if(DIRECTINPUT_VERSION >= 0x0600)
  246. #define DIEP_STARTDELAY             0x00000200
  247. #define DIEP_ALLPARAMS_DX5          0x000001FF
  248. #define DIEP_ALLPARAMS              0x000003FF
  249. #else /* DIRECTINPUT_VERSION < 0x0600 */
  250. #define DIEP_ALLPARAMS              0x000001FF
  251. #endif /* DIRECTINPUT_VERSION < 0x0600 */
  252. #define DIEP_START                  0x20000000
  253. #define DIEP_NORESTART              0x40000000
  254. #define DIEP_NODOWNLOAD             0x80000000
  255. #define DIEB_NOTRIGGER              0xFFFFFFFF
  256. #define DIES_SOLO                   0x00000001
  257. #define DIES_NODOWNLOAD             0x80000000
  258. #define DIEGES_PLAYING              0x00000001
  259. #define DIEGES_EMULATED             0x00000002
  260. typedef struct DIEFFESCAPE {
  261.     DWORD   dwSize;
  262.     DWORD   dwCommand;
  263.     LPVOID  lpvInBuffer;
  264.     DWORD   cbInBuffer;
  265.     LPVOID  lpvOutBuffer;
  266.     DWORD   cbOutBuffer;
  267. } DIEFFESCAPE, *LPDIEFFESCAPE;
  268. #ifndef DIJ_RINGZERO
  269. #undef INTERFACE
  270. #define INTERFACE IDirectInputEffect
  271. DECLARE_INTERFACE_(IDirectInputEffect, IUnknown)
  272. {
  273.     /*** IUnknown methods ***/
  274.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  275.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  276.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  277.     /*** IDirectInputEffect methods ***/
  278.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  279.     STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
  280.     STDMETHOD(GetParameters)(THIS_ LPDIEFFECT,DWORD) PURE;
  281.     STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT,DWORD) PURE;
  282.     STDMETHOD(Start)(THIS_ DWORD,DWORD) PURE;
  283.     STDMETHOD(Stop)(THIS) PURE;
  284.     STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
  285.     STDMETHOD(Download)(THIS) PURE;
  286.     STDMETHOD(Unload)(THIS) PURE;
  287.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  288. };
  289. typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
  290. #if !defined(__cplusplus) || defined(CINTERFACE)
  291. #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  292. #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
  293. #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
  294. #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  295. #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
  296. #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
  297. #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
  298. #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
  299. #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
  300. #define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a)
  301. #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
  302. #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
  303. #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  304. #else
  305. #define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  306. #define IDirectInputEffect_AddRef(p) (p)->AddRef()
  307. #define IDirectInputEffect_Release(p) (p)->Release()
  308. #define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  309. #define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
  310. #define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
  311. #define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
  312. #define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
  313. #define IDirectInputEffect_Stop(p) (p)->Stop()
  314. #define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a)
  315. #define IDirectInputEffect_Download(p) (p)->Download()
  316. #define IDirectInputEffect_Unload(p) (p)->Unload()
  317. #define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
  318. #endif
  319. #endif /* DIJ_RINGZERO */
  320. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  321. /****************************************************************************
  322.  *
  323.  *      IDirectInputDevice
  324.  *
  325.  ****************************************************************************/
  326. #if DIRECTINPUT_VERSION <= 0x700
  327. #define DIDEVTYPE_DEVICE        1
  328. #define DIDEVTYPE_MOUSE         2
  329. #define DIDEVTYPE_KEYBOARD      3
  330. #define DIDEVTYPE_JOYSTICK      4
  331. #else
  332. #define DI8DEVCLASS_ALL             0
  333. #define DI8DEVCLASS_DEVICE          1
  334. #define DI8DEVCLASS_POINTER         2
  335. #define DI8DEVCLASS_KEYBOARD        3
  336. #define DI8DEVCLASS_GAMECTRL        4
  337. #define DI8DEVTYPE_DEVICE           0x11
  338. #define DI8DEVTYPE_MOUSE            0x12
  339. #define DI8DEVTYPE_KEYBOARD         0x13
  340. #define DI8DEVTYPE_JOYSTICK         0x14
  341. #define DI8DEVTYPE_GAMEPAD          0x15
  342. #define DI8DEVTYPE_DRIVING          0x16
  343. #define DI8DEVTYPE_FLIGHT           0x17
  344. #define DI8DEVTYPE_1STPERSON        0x18
  345. #define DI8DEVTYPE_DEVICECTRL       0x19
  346. #define DI8DEVTYPE_SCREENPOINTER    0x1A
  347. #define DI8DEVTYPE_REMOTE           0x1B
  348. #define DI8DEVTYPE_SUPPLEMENTAL     0x1C
  349. #endif /* DIRECTINPUT_VERSION <= 0x700 */
  350. #define DIDEVTYPE_HID           0x00010000
  351. #if DIRECTINPUT_VERSION <= 0x700
  352. #define DIDEVTYPEMOUSE_UNKNOWN          1
  353. #define DIDEVTYPEMOUSE_TRADITIONAL      2
  354. #define DIDEVTYPEMOUSE_FINGERSTICK      3
  355. #define DIDEVTYPEMOUSE_TOUCHPAD         4
  356. #define DIDEVTYPEMOUSE_TRACKBALL        5
  357. #define DIDEVTYPEKEYBOARD_UNKNOWN       0
  358. #define DIDEVTYPEKEYBOARD_PCXT          1
  359. #define DIDEVTYPEKEYBOARD_OLIVETTI      2
  360. #define DIDEVTYPEKEYBOARD_PCAT          3
  361. #define DIDEVTYPEKEYBOARD_PCENH         4
  362. #define DIDEVTYPEKEYBOARD_NOKIA1050     5
  363. #define DIDEVTYPEKEYBOARD_NOKIA9140     6
  364. #define DIDEVTYPEKEYBOARD_NEC98         7
  365. #define DIDEVTYPEKEYBOARD_NEC98LAPTOP   8
  366. #define DIDEVTYPEKEYBOARD_NEC98106      9
  367. #define DIDEVTYPEKEYBOARD_JAPAN106     10
  368. #define DIDEVTYPEKEYBOARD_JAPANAX      11
  369. #define DIDEVTYPEKEYBOARD_J3100        12
  370. #define DIDEVTYPEJOYSTICK_UNKNOWN       1
  371. #define DIDEVTYPEJOYSTICK_TRADITIONAL   2
  372. #define DIDEVTYPEJOYSTICK_FLIGHTSTICK   3
  373. #define DIDEVTYPEJOYSTICK_GAMEPAD       4
  374. #define DIDEVTYPEJOYSTICK_RUDDER        5
  375. #define DIDEVTYPEJOYSTICK_WHEEL         6
  376. #define DIDEVTYPEJOYSTICK_HEADTRACKER   7
  377. #else
  378. #define DI8DEVTYPEMOUSE_UNKNOWN                     1
  379. #define DI8DEVTYPEMOUSE_TRADITIONAL                 2
  380. #define DI8DEVTYPEMOUSE_FINGERSTICK                 3
  381. #define DI8DEVTYPEMOUSE_TOUCHPAD                    4
  382. #define DI8DEVTYPEMOUSE_TRACKBALL                   5
  383. #define DI8DEVTYPEMOUSE_ABSOLUTE                    6
  384. #define DI8DEVTYPEKEYBOARD_UNKNOWN                  0
  385. #define DI8DEVTYPEKEYBOARD_PCXT                     1
  386. #define DI8DEVTYPEKEYBOARD_OLIVETTI                 2
  387. #define DI8DEVTYPEKEYBOARD_PCAT                     3
  388. #define DI8DEVTYPEKEYBOARD_PCENH                    4
  389. #define DI8DEVTYPEKEYBOARD_NOKIA1050                5
  390. #define DI8DEVTYPEKEYBOARD_NOKIA9140                6
  391. #define DI8DEVTYPEKEYBOARD_NEC98                    7
  392. #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP              8
  393. #define DI8DEVTYPEKEYBOARD_NEC98106                 9
  394. #define DI8DEVTYPEKEYBOARD_JAPAN106                10
  395. #define DI8DEVTYPEKEYBOARD_JAPANAX                 11
  396. #define DI8DEVTYPEKEYBOARD_J3100                   12
  397. #define DI8DEVTYPE_LIMITEDGAMESUBTYPE               1
  398. #define DI8DEVTYPEJOYSTICK_LIMITED                  DI8DEVTYPE_LIMITEDGAMESUBTYPE
  399. #define DI8DEVTYPEJOYSTICK_STANDARD                 2
  400. #define DI8DEVTYPEGAMEPAD_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
  401. #define DI8DEVTYPEGAMEPAD_STANDARD                  2
  402. #define DI8DEVTYPEGAMEPAD_TILT                      3
  403. #define DI8DEVTYPEDRIVING_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
  404. #define DI8DEVTYPEDRIVING_COMBINEDPEDALS            2
  405. #define DI8DEVTYPEDRIVING_DUALPEDALS                3
  406. #define DI8DEVTYPEDRIVING_THREEPEDALS               4
  407. #define DI8DEVTYPEDRIVING_HANDHELD                  5
  408. #define DI8DEVTYPEFLIGHT_LIMITED                    DI8DEVTYPE_LIMITEDGAMESUBTYPE
  409. #define DI8DEVTYPEFLIGHT_STICK                      2
  410. #define DI8DEVTYPEFLIGHT_YOKE                       3
  411. #define DI8DEVTYPEFLIGHT_RC                         4
  412. #define DI8DEVTYPE1STPERSON_LIMITED                 DI8DEVTYPE_LIMITEDGAMESUBTYPE
  413. #define DI8DEVTYPE1STPERSON_UNKNOWN                 2
  414. #define DI8DEVTYPE1STPERSON_SIXDOF                  3
  415. #define DI8DEVTYPE1STPERSON_SHOOTER                 4
  416. #define DI8DEVTYPESCREENPTR_UNKNOWN                 2
  417. #define DI8DEVTYPESCREENPTR_LIGHTGUN                3
  418. #define DI8DEVTYPESCREENPTR_LIGHTPEN                4
  419. #define DI8DEVTYPESCREENPTR_TOUCH                   5
  420. #define DI8DEVTYPEREMOTE_UNKNOWN                    2
  421. #define DI8DEVTYPEDEVICECTRL_UNKNOWN                2
  422. #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION         3
  423. #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
  424. #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN              2
  425. #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER    3
  426. #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER          4
  427. #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER          5
  428. #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE       6
  429. #define DI8DEVTYPESUPPLEMENTAL_SHIFTER              7
  430. #define DI8DEVTYPESUPPLEMENTAL_THROTTLE             8
  431. #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE        9
  432. #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS      10
  433. #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS          11
  434. #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS         12
  435. #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS        13
  436. #endif /* DIRECTINPUT_VERSION <= 0x700 */
  437. #define GET_DIDEVICE_TYPE(dwDevType)    LOBYTE(dwDevType)
  438. #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
  439. #if(DIRECTINPUT_VERSION >= 0x0500)
  440. /* This structure is defined for DirectX 3.0 compatibility */
  441. typedef struct DIDEVCAPS_DX3 {
  442.     DWORD   dwSize;
  443.     DWORD   dwFlags;
  444.     DWORD   dwDevType;
  445.     DWORD   dwAxes;
  446.     DWORD   dwButtons;
  447.     DWORD   dwPOVs;
  448. } DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
  449. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  450. typedef struct DIDEVCAPS {
  451.     DWORD   dwSize;
  452.     DWORD   dwFlags;
  453.     DWORD   dwDevType;
  454.     DWORD   dwAxes;
  455.     DWORD   dwButtons;
  456.     DWORD   dwPOVs;
  457. #if(DIRECTINPUT_VERSION >= 0x0500)
  458.     DWORD   dwFFSamplePeriod;
  459.     DWORD   dwFFMinTimeResolution;
  460.     DWORD   dwFirmwareRevision;
  461.     DWORD   dwHardwareRevision;
  462.     DWORD   dwFFDriverVersion;
  463. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  464. } DIDEVCAPS, *LPDIDEVCAPS;
  465. #define DIDC_ATTACHED           0x00000001
  466. #define DIDC_POLLEDDEVICE       0x00000002
  467. #define DIDC_EMULATED           0x00000004
  468. #define DIDC_POLLEDDATAFORMAT   0x00000008
  469. #if(DIRECTINPUT_VERSION >= 0x0500)
  470. #define DIDC_FORCEFEEDBACK      0x00000100
  471. #define DIDC_FFATTACK           0x00000200
  472. #define DIDC_FFFADE             0x00000400
  473. #define DIDC_SATURATION         0x00000800
  474. #define DIDC_POSNEGCOEFFICIENTS 0x00001000
  475. #define DIDC_POSNEGSATURATION   0x00002000
  476. #define DIDC_DEADBAND           0x00004000
  477. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  478. #define DIDC_STARTDELAY         0x00008000
  479. #if(DIRECTINPUT_VERSION >= 0x050a)
  480. #define DIDC_ALIAS              0x00010000
  481. #define DIDC_PHANTOM            0x00020000
  482. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  483. #if(DIRECTINPUT_VERSION >= 0x0800)
  484. #define DIDC_HIDDEN             0x00040000
  485. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  486. #define DIDFT_ALL           0x00000000
  487. #define DIDFT_RELAXIS       0x00000001
  488. #define DIDFT_ABSAXIS       0x00000002
  489. #define DIDFT_AXIS          0x00000003
  490. #define DIDFT_PSHBUTTON     0x00000004
  491. #define DIDFT_TGLBUTTON     0x00000008
  492. #define DIDFT_BUTTON        0x0000000C
  493. #define DIDFT_POV           0x00000010
  494. #define DIDFT_COLLECTION    0x00000040
  495. #define DIDFT_NODATA        0x00000080
  496. #define DIDFT_ANYINSTANCE   0x00FFFF00
  497. #define DIDFT_INSTANCEMASK  DIDFT_ANYINSTANCE
  498. #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
  499. #define DIDFT_GETTYPE(n)     LOBYTE(n)
  500. #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
  501. #define DIDFT_FFACTUATOR        0x01000000
  502. #define DIDFT_FFEFFECTTRIGGER   0x02000000
  503. #if(DIRECTINPUT_VERSION >= 0x050a)
  504. #define DIDFT_OUTPUT            0x10000000
  505. #define DIDFT_VENDORDEFINED     0x04000000
  506. #define DIDFT_ALIAS             0x08000000
  507. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  508. #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
  509. #define DIDFT_NOCOLLECTION      0x00FFFF00
  510. #ifndef DIJ_RINGZERO
  511. typedef struct _DIOBJECTDATAFORMAT {
  512.     const GUID *pguid;
  513.     DWORD   dwOfs;
  514.     DWORD   dwType;
  515.     DWORD   dwFlags;
  516. } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
  517. typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
  518. typedef struct _DIDATAFORMAT {
  519.     DWORD   dwSize;
  520.     DWORD   dwObjSize;
  521.     DWORD   dwFlags;
  522.     DWORD   dwDataSize;
  523.     DWORD   dwNumObjs;
  524.     LPDIOBJECTDATAFORMAT rgodf;
  525. } DIDATAFORMAT, *LPDIDATAFORMAT;
  526. typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
  527. #define DIDF_ABSAXIS            0x00000001
  528. #define DIDF_RELAXIS            0x00000002
  529. #ifdef __cplusplus
  530. extern "C" {
  531. #endif
  532. extern const DIDATAFORMAT c_dfDIMouse;
  533. #if(DIRECTINPUT_VERSION >= 0x0700)
  534. extern const DIDATAFORMAT c_dfDIMouse2;
  535. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  536. extern const DIDATAFORMAT c_dfDIKeyboard;
  537. #if(DIRECTINPUT_VERSION >= 0x0500)
  538. extern const DIDATAFORMAT c_dfDIJoystick;
  539. extern const DIDATAFORMAT c_dfDIJoystick2;
  540. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  541. #ifdef __cplusplus
  542. };
  543. #endif
  544. #if DIRECTINPUT_VERSION > 0x0700
  545. typedef struct _DIACTIONA {
  546.                 UINT_PTR    uAppData;
  547.                 DWORD       dwSemantic;
  548.     OPTIONAL    DWORD       dwFlags;
  549.     OPTIONAL    union {
  550.                     LPCSTR      lptszActionName;
  551.                     UINT        uResIdString;
  552.                 };
  553.     OPTIONAL    GUID        guidInstance;
  554.     OPTIONAL    DWORD       dwObjID;
  555.     OPTIONAL    DWORD       dwHow;
  556. } DIACTIONA, *LPDIACTIONA ;
  557. typedef struct _DIACTIONW {
  558.                 UINT_PTR    uAppData;
  559.                 DWORD       dwSemantic;
  560.     OPTIONAL    DWORD       dwFlags;
  561.     OPTIONAL    union {
  562.                     LPCWSTR     lptszActionName;
  563.                     UINT        uResIdString;
  564.                 };
  565.     OPTIONAL    GUID        guidInstance;
  566.     OPTIONAL    DWORD       dwObjID;
  567.     OPTIONAL    DWORD       dwHow;
  568. } DIACTIONW, *LPDIACTIONW ;
  569. #ifdef UNICODE
  570. typedef DIACTIONW DIACTION;
  571. typedef LPDIACTIONW LPDIACTION;
  572. #else
  573. typedef DIACTIONA DIACTION;
  574. typedef LPDIACTIONA LPDIACTION;
  575. #endif // UNICODE
  576. typedef const DIACTIONA *LPCDIACTIONA;
  577. typedef const DIACTIONW *LPCDIACTIONW;
  578. #ifdef UNICODE
  579. typedef DIACTIONW DIACTION;
  580. typedef LPCDIACTIONW LPCDIACTION;
  581. #else
  582. typedef DIACTIONA DIACTION;
  583. typedef LPCDIACTIONA LPCDIACTION;
  584. #endif // UNICODE
  585. typedef const DIACTION *LPCDIACTION;
  586. #define DIA_FORCEFEEDBACK       0x00000001
  587. #define DIA_APPMAPPED           0x00000002
  588. #define DIA_APPNOMAP            0x00000004
  589. #define DIA_NORANGE             0x00000008
  590. #define DIA_APPFIXED            0x00000010
  591. #define DIAH_UNMAPPED           0x00000000
  592. #define DIAH_USERCONFIG         0x00000001
  593. #define DIAH_APPREQUESTED       0x00000002
  594. #define DIAH_HWAPP              0x00000004
  595. #define DIAH_HWDEFAULT          0x00000008
  596. #define DIAH_DEFAULT            0x00000020
  597. #define DIAH_ERROR              0x80000000
  598. typedef struct _DIACTIONFORMATA {
  599.                 DWORD       dwSize;
  600.                 DWORD       dwActionSize;
  601.                 DWORD       dwDataSize;
  602.                 DWORD       dwNumActions;
  603.                 LPDIACTIONA rgoAction;
  604.                 GUID        guidActionMap;
  605.                 DWORD       dwGenre;
  606.                 DWORD       dwBufferSize;
  607.     OPTIONAL    LONG        lAxisMin;
  608.     OPTIONAL    LONG        lAxisMax;
  609.     OPTIONAL    HINSTANCE   hInstString;
  610.                 FILETIME    ftTimeStamp;
  611.                 DWORD       dwCRC;
  612.                 CHAR        tszActionMap[MAX_PATH];
  613. } DIACTIONFORMATA, *LPDIACTIONFORMATA;
  614. typedef struct _DIACTIONFORMATW {
  615.                 DWORD       dwSize;
  616.                 DWORD       dwActionSize;
  617.                 DWORD       dwDataSize;
  618.                 DWORD       dwNumActions;
  619.                 LPDIACTIONW rgoAction;
  620.                 GUID        guidActionMap;
  621.                 DWORD       dwGenre;
  622.                 DWORD       dwBufferSize;
  623.     OPTIONAL    LONG        lAxisMin;
  624.     OPTIONAL    LONG        lAxisMax;
  625.     OPTIONAL    HINSTANCE   hInstString;
  626.                 FILETIME    ftTimeStamp;
  627.                 DWORD       dwCRC;
  628.                 WCHAR       tszActionMap[MAX_PATH];
  629. } DIACTIONFORMATW, *LPDIACTIONFORMATW;
  630. #ifdef UNICODE
  631. typedef DIACTIONFORMATW DIACTIONFORMAT;
  632. typedef LPDIACTIONFORMATW LPDIACTIONFORMAT;
  633. #else
  634. typedef DIACTIONFORMATA DIACTIONFORMAT;
  635. typedef LPDIACTIONFORMATA LPDIACTIONFORMAT;
  636. #endif // UNICODE
  637. typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
  638. typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
  639. #ifdef UNICODE
  640. typedef DIACTIONFORMATW DIACTIONFORMAT;
  641. typedef LPCDIACTIONFORMATW LPCDIACTIONFORMAT;
  642. #else
  643. typedef DIACTIONFORMATA DIACTIONFORMAT;
  644. typedef LPCDIACTIONFORMATA LPCDIACTIONFORMAT;
  645. #endif // UNICODE
  646. typedef const DIACTIONFORMAT *LPCDIACTIONFORMAT;
  647. #define DIAFTS_NEWDEVICELOW     0xFFFFFFFF
  648. #define DIAFTS_NEWDEVICEHIGH    0xFFFFFFFF
  649. #define DIAFTS_UNUSEDDEVICELOW  0x00000000
  650. #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
  651. #define DIDBAM_DEFAULT          0x00000000
  652. #define DIDBAM_PRESERVE         0x00000001
  653. #define DIDBAM_INITIALIZE       0x00000002
  654. #define DIDBAM_HWDEFAULTS       0x00000004
  655. #define DIDSAM_DEFAULT          0x00000000
  656. #define DIDSAM_NOUSER           0x00000001
  657. #define DIDSAM_FORCESAVE        0x00000002
  658. #define DICD_DEFAULT            0x00000000
  659. #define DICD_EDIT               0x00000001
  660. /*
  661.  * The following definition is normally defined in d3dtypes.h
  662.  */
  663. #ifndef D3DCOLOR_DEFINED
  664. typedef DWORD D3DCOLOR;
  665. #define D3DCOLOR_DEFINED
  666. #endif
  667. typedef struct _DICOLORSET{
  668.     DWORD dwSize;
  669.     D3DCOLOR cTextFore;
  670.     D3DCOLOR cTextHighlight;
  671.     D3DCOLOR cCalloutLine;
  672.     D3DCOLOR cCalloutHighlight;
  673.     D3DCOLOR cBorder;
  674.     D3DCOLOR cControlFill;
  675.     D3DCOLOR cHighlightFill;
  676.     D3DCOLOR cAreaFill;
  677. } DICOLORSET, *LPDICOLORSET;
  678. typedef const DICOLORSET *LPCDICOLORSET;
  679. typedef struct _DICONFIGUREDEVICESPARAMSA{
  680.      DWORD             dwSize;
  681.      DWORD             dwcUsers;
  682.      LPSTR             lptszUserNames;
  683.      DWORD             dwcFormats;
  684.      LPDIACTIONFORMATA lprgFormats;
  685.      HWND              hwnd;
  686.      DICOLORSET        dics;
  687.      IUnknown FAR *    lpUnkDDSTarget;
  688. } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
  689. typedef struct _DICONFIGUREDEVICESPARAMSW{
  690.      DWORD             dwSize;
  691.      DWORD             dwcUsers;
  692.      LPWSTR            lptszUserNames;
  693.      DWORD             dwcFormats;
  694.      LPDIACTIONFORMATW lprgFormats;
  695.      HWND              hwnd;
  696.      DICOLORSET        dics;
  697.      IUnknown FAR *    lpUnkDDSTarget;
  698. } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
  699. #ifdef UNICODE
  700. typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
  701. typedef LPDICONFIGUREDEVICESPARAMSW LPDICONFIGUREDEVICESPARAMS;
  702. #else
  703. typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
  704. typedef LPDICONFIGUREDEVICESPARAMSA LPDICONFIGUREDEVICESPARAMS;
  705. #endif // UNICODE
  706. typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
  707. typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
  708. #ifdef UNICODE
  709. typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
  710. typedef LPCDICONFIGUREDEVICESPARAMSW LPCDICONFIGUREDEVICESPARAMS;
  711. #else
  712. typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
  713. typedef LPCDICONFIGUREDEVICESPARAMSA LPCDICONFIGUREDEVICESPARAMS;
  714. #endif // UNICODE
  715. typedef const DICONFIGUREDEVICESPARAMS *LPCDICONFIGUREDEVICESPARAMS;
  716. #define DIDIFT_CONFIGURATION    0x00000001
  717. #define DIDIFT_OVERLAY          0x00000002
  718. #define DIDAL_CENTERED      0x00000000
  719. #define DIDAL_LEFTALIGNED   0x00000001
  720. #define DIDAL_RIGHTALIGNED  0x00000002
  721. #define DIDAL_MIDDLE        0x00000000
  722. #define DIDAL_TOPALIGNED    0x00000004
  723. #define DIDAL_BOTTOMALIGNED 0x00000008
  724. typedef struct _DIDEVICEIMAGEINFOA {
  725.     CHAR        tszImagePath[MAX_PATH];
  726.     DWORD       dwFlags; 
  727.     // These are valid if DIDIFT_OVERLAY is present in dwFlags.
  728.     DWORD       dwViewID;      
  729.     RECT        rcOverlay;             
  730.     DWORD       dwObjID;
  731.     DWORD       dwcValidPts;
  732.     POINT       rgptCalloutLine[5];  
  733.     RECT        rcCalloutRect;  
  734.     DWORD       dwTextAlign;     
  735. } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
  736. typedef struct _DIDEVICEIMAGEINFOW {
  737.     WCHAR       tszImagePath[MAX_PATH];
  738.     DWORD       dwFlags; 
  739.     // These are valid if DIDIFT_OVERLAY is present in dwFlags.
  740.     DWORD       dwViewID;      
  741.     RECT        rcOverlay;             
  742.     DWORD       dwObjID;
  743.     DWORD       dwcValidPts;
  744.     POINT       rgptCalloutLine[5];  
  745.     RECT        rcCalloutRect;  
  746.     DWORD       dwTextAlign;     
  747. } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
  748. #ifdef UNICODE
  749. typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
  750. typedef LPDIDEVICEIMAGEINFOW LPDIDEVICEIMAGEINFO;
  751. #else
  752. typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
  753. typedef LPDIDEVICEIMAGEINFOA LPDIDEVICEIMAGEINFO;
  754. #endif // UNICODE
  755. typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
  756. typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
  757. #ifdef UNICODE
  758. typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
  759. typedef LPCDIDEVICEIMAGEINFOW LPCDIDEVICEIMAGEINFO;
  760. #else
  761. typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
  762. typedef LPCDIDEVICEIMAGEINFOA LPCDIDEVICEIMAGEINFO;
  763. #endif // UNICODE
  764. typedef const DIDEVICEIMAGEINFO *LPCDIDEVICEIMAGEINFO;
  765. typedef struct _DIDEVICEIMAGEINFOHEADERA {
  766.     DWORD       dwSize;
  767.     DWORD       dwSizeImageInfo;
  768.     DWORD       dwcViews;
  769.     DWORD       dwcButtons;
  770.     DWORD       dwcAxes;
  771.     DWORD       dwcPOVs;
  772.     DWORD       dwBufferSize;
  773.     DWORD       dwBufferUsed;
  774.     LPDIDEVICEIMAGEINFOA lprgImageInfoArray;
  775. } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
  776. typedef struct _DIDEVICEIMAGEINFOHEADERW {
  777.     DWORD       dwSize;
  778.     DWORD       dwSizeImageInfo;
  779.     DWORD       dwcViews;
  780.     DWORD       dwcButtons;
  781.     DWORD       dwcAxes;
  782.     DWORD       dwcPOVs;
  783.     DWORD       dwBufferSize;
  784.     DWORD       dwBufferUsed;
  785.     LPDIDEVICEIMAGEINFOW lprgImageInfoArray;
  786. } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
  787. #ifdef UNICODE
  788. typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
  789. typedef LPDIDEVICEIMAGEINFOHEADERW LPDIDEVICEIMAGEINFOHEADER;
  790. #else
  791. typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
  792. typedef LPDIDEVICEIMAGEINFOHEADERA LPDIDEVICEIMAGEINFOHEADER;
  793. #endif // UNICODE
  794. typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
  795. typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
  796. #ifdef UNICODE
  797. typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
  798. typedef LPCDIDEVICEIMAGEINFOHEADERW LPCDIDEVICEIMAGEINFOHEADER;
  799. #else
  800. typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
  801. typedef LPCDIDEVICEIMAGEINFOHEADERA LPCDIDEVICEIMAGEINFOHEADER;
  802. #endif // UNICODE
  803. typedef const DIDEVICEIMAGEINFOHEADER *LPCDIDEVICEIMAGEINFOHEADER;
  804. #endif /* DIRECTINPUT_VERSION > 0x0700 */
  805. #if(DIRECTINPUT_VERSION >= 0x0500)
  806. /* These structures are defined for DirectX 3.0 compatibility */
  807. typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
  808.     DWORD   dwSize;
  809.     GUID    guidType;
  810.     DWORD   dwOfs;
  811.     DWORD   dwType;
  812.     DWORD   dwFlags;
  813.     CHAR    tszName[MAX_PATH];
  814. } DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
  815. typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
  816.     DWORD   dwSize;
  817.     GUID    guidType;
  818.     DWORD   dwOfs;
  819.     DWORD   dwType;
  820.     DWORD   dwFlags;
  821.     WCHAR   tszName[MAX_PATH];
  822. } DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
  823. #ifdef UNICODE
  824. typedef DIDEVICEOBJECTINSTANCE_DX3W DIDEVICEOBJECTINSTANCE_DX3;
  825. typedef LPDIDEVICEOBJECTINSTANCE_DX3W LPDIDEVICEOBJECTINSTANCE_DX3;
  826. #else
  827. typedef DIDEVICEOBJECTINSTANCE_DX3A DIDEVICEOBJECTINSTANCE_DX3;
  828. typedef LPDIDEVICEOBJECTINSTANCE_DX3A LPDIDEVICEOBJECTINSTANCE_DX3;
  829. #endif // UNICODE
  830. typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
  831. typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
  832. typedef const DIDEVICEOBJECTINSTANCE_DX3  *LPCDIDEVICEOBJECTINSTANCE_DX3;
  833. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  834. typedef struct DIDEVICEOBJECTINSTANCEA {
  835.     DWORD   dwSize;
  836.     GUID    guidType;
  837.     DWORD   dwOfs;
  838.     DWORD   dwType;
  839.     DWORD   dwFlags;
  840.     CHAR    tszName[MAX_PATH];
  841. #if(DIRECTINPUT_VERSION >= 0x0500)
  842.     DWORD   dwFFMaxForce;
  843.     DWORD   dwFFForceResolution;
  844.     WORD    wCollectionNumber;
  845.     WORD    wDesignatorIndex;
  846.     WORD    wUsagePage;
  847.     WORD    wUsage;
  848.     DWORD   dwDimension;
  849.     WORD    wExponent;
  850.     WORD    wReportId;
  851. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  852. } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
  853. typedef struct DIDEVICEOBJECTINSTANCEW {
  854.     DWORD   dwSize;
  855.     GUID    guidType;
  856.     DWORD   dwOfs;
  857.     DWORD   dwType;
  858.     DWORD   dwFlags;
  859.     WCHAR   tszName[MAX_PATH];
  860. #if(DIRECTINPUT_VERSION >= 0x0500)
  861.     DWORD   dwFFMaxForce;
  862.     DWORD   dwFFForceResolution;
  863.     WORD    wCollectionNumber;
  864.     WORD    wDesignatorIndex;
  865.     WORD    wUsagePage;
  866.     WORD    wUsage;
  867.     DWORD   dwDimension;
  868.     WORD    wExponent;
  869.     WORD    wReportId;
  870. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  871. } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
  872. #ifdef UNICODE
  873. typedef DIDEVICEOBJECTINSTANCEW DIDEVICEOBJECTINSTANCE;
  874. typedef LPDIDEVICEOBJECTINSTANCEW LPDIDEVICEOBJECTINSTANCE;
  875. #else
  876. typedef DIDEVICEOBJECTINSTANCEA DIDEVICEOBJECTINSTANCE;
  877. typedef LPDIDEVICEOBJECTINSTANCEA LPDIDEVICEOBJECTINSTANCE;
  878. #endif // UNICODE
  879. typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
  880. typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
  881. typedef const DIDEVICEOBJECTINSTANCE  *LPCDIDEVICEOBJECTINSTANCE;
  882. typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
  883. typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW, LPVOID);
  884. #ifdef UNICODE
  885. #define LPDIENUMDEVICEOBJECTSCALLBACK  LPDIENUMDEVICEOBJECTSCALLBACKW
  886. #else
  887. #define LPDIENUMDEVICEOBJECTSCALLBACK  LPDIENUMDEVICEOBJECTSCALLBACKA
  888. #endif // !UNICODE
  889. #if(DIRECTINPUT_VERSION >= 0x0500)
  890. #define DIDOI_FFACTUATOR        0x00000001
  891. #define DIDOI_FFEFFECTTRIGGER   0x00000002
  892. #define DIDOI_POLLED            0x00008000
  893. #define DIDOI_ASPECTPOSITION    0x00000100
  894. #define DIDOI_ASPECTVELOCITY    0x00000200
  895. #define DIDOI_ASPECTACCEL       0x00000300
  896. #define DIDOI_ASPECTFORCE       0x00000400
  897. #define DIDOI_ASPECTMASK        0x00000F00
  898. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  899. #if(DIRECTINPUT_VERSION >= 0x050a)
  900. #define DIDOI_GUIDISUSAGE       0x00010000
  901. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  902. typedef struct DIPROPHEADER {
  903.     DWORD   dwSize;
  904.     DWORD   dwHeaderSize;
  905.     DWORD   dwObj;
  906.     DWORD   dwHow;
  907. } DIPROPHEADER, *LPDIPROPHEADER;
  908. typedef const DIPROPHEADER *LPCDIPROPHEADER;
  909. #define DIPH_DEVICE             0
  910. #define DIPH_BYOFFSET           1
  911. #define DIPH_BYID               2
  912. #if(DIRECTINPUT_VERSION >= 0x050a)
  913. #define DIPH_BYUSAGE            3
  914. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  915. #if(DIRECTINPUT_VERSION >= 0x050a)
  916. #define DIMAKEUSAGEDWORD(UsagePage, Usage) 
  917.                                 (DWORD)MAKELONG(Usage, UsagePage)
  918. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  919. typedef struct DIPROPDWORD {
  920.     DIPROPHEADER diph;
  921.     DWORD   dwData;
  922. } DIPROPDWORD, *LPDIPROPDWORD;
  923. typedef const DIPROPDWORD *LPCDIPROPDWORD;
  924. #if(DIRECTINPUT_VERSION >= 0x0800)
  925. typedef struct DIPROPPOINTER {
  926.     DIPROPHEADER diph;
  927.     UINT_PTR uData;
  928. } DIPROPPOINTER, *LPDIPROPPOINTER;
  929. typedef const DIPROPPOINTER *LPCDIPROPPOINTER;
  930. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  931. typedef struct DIPROPRANGE {
  932.     DIPROPHEADER diph;
  933.     LONG    lMin;
  934.     LONG    lMax;
  935. } DIPROPRANGE, *LPDIPROPRANGE;
  936. typedef const DIPROPRANGE *LPCDIPROPRANGE;
  937. #define DIPROPRANGE_NOMIN       ((LONG)0x80000000)
  938. #define DIPROPRANGE_NOMAX       ((LONG)0x7FFFFFFF)
  939. #if(DIRECTINPUT_VERSION >= 0x050a)
  940. typedef struct DIPROPCAL {
  941.     DIPROPHEADER diph;
  942.     LONG    lMin;
  943.     LONG    lCenter;
  944.     LONG    lMax;
  945. } DIPROPCAL, *LPDIPROPCAL;
  946. typedef const DIPROPCAL *LPCDIPROPCAL;
  947. typedef struct DIPROPCALPOV {
  948.     DIPROPHEADER diph;
  949.     LONG   lMin[5];
  950.     LONG   lMax[5];
  951. } DIPROPCALPOV, *LPDIPROPCALPOV;
  952. typedef const DIPROPCALPOV *LPCDIPROPCALPOV;
  953. typedef struct DIPROPGUIDANDPATH {
  954.     DIPROPHEADER diph;
  955.     GUID    guidClass;
  956.     WCHAR   wszPath[MAX_PATH];
  957. } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
  958. typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
  959. typedef struct DIPROPSTRING {
  960.     DIPROPHEADER diph;
  961.     WCHAR   wsz[MAX_PATH];
  962. } DIPROPSTRING, *LPDIPROPSTRING;
  963. typedef const DIPROPSTRING *LPCDIPROPSTRING;
  964. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  965. #if(DIRECTINPUT_VERSION >= 0x0800)
  966. #define MAXCPOINTSNUM          8
  967. typedef struct _CPOINT
  968. {
  969.     LONG  lP;     // raw value
  970.     DWORD dwLog;  // logical_value / max_logical_value * 10000
  971. } CPOINT, *PCPOINT;
  972. typedef struct DIPROPCPOINTS {
  973.     DIPROPHEADER diph;
  974.     DWORD  dwCPointsNum;
  975.     CPOINT cp[MAXCPOINTSNUM];
  976. } DIPROPCPOINTS, *LPDIPROPCPOINTS;
  977. typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;
  978. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  979. #ifdef __cplusplus
  980. #define MAKEDIPROP(prop)    (*(const GUID *)(prop))
  981. #else
  982. #define MAKEDIPROP(prop)    ((REFGUID)(prop))
  983. #endif
  984. #define DIPROP_BUFFERSIZE       MAKEDIPROP(1)
  985. #define DIPROP_AXISMODE         MAKEDIPROP(2)
  986. #define DIPROPAXISMODE_ABS      0
  987. #define DIPROPAXISMODE_REL      1
  988. #define DIPROP_GRANULARITY      MAKEDIPROP(3)
  989. #define DIPROP_RANGE            MAKEDIPROP(4)
  990. #define DIPROP_DEADZONE         MAKEDIPROP(5)
  991. #define DIPROP_SATURATION       MAKEDIPROP(6)
  992. #define DIPROP_FFGAIN           MAKEDIPROP(7)
  993. #define DIPROP_FFLOAD           MAKEDIPROP(8)
  994. #define DIPROP_AUTOCENTER       MAKEDIPROP(9)
  995. #define DIPROPAUTOCENTER_OFF    0
  996. #define DIPROPAUTOCENTER_ON     1
  997. #define DIPROP_CALIBRATIONMODE  MAKEDIPROP(10)
  998. #define DIPROPCALIBRATIONMODE_COOKED    0
  999. #define DIPROPCALIBRATIONMODE_RAW       1
  1000. #if(DIRECTINPUT_VERSION >= 0x050a)
  1001. #define DIPROP_CALIBRATION      MAKEDIPROP(11)
  1002. #define DIPROP_GUIDANDPATH      MAKEDIPROP(12)
  1003. #define DIPROP_INSTANCENAME     MAKEDIPROP(13)
  1004. #define DIPROP_PRODUCTNAME      MAKEDIPROP(14)
  1005. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  1006. #if(DIRECTINPUT_VERSION >= 0x05b2)
  1007. #define DIPROP_JOYSTICKID       MAKEDIPROP(15)
  1008. #define DIPROP_GETPORTDISPLAYNAME       MAKEDIPROP(16)
  1009. #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
  1010. #if(DIRECTINPUT_VERSION >= 0x0700)
  1011. #define DIPROP_PHYSICALRANGE            MAKEDIPROP(18)
  1012. #define DIPROP_LOGICALRANGE             MAKEDIPROP(19)
  1013. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  1014. #if(DIRECTINPUT_VERSION >= 0x0800)
  1015. #define DIPROP_KEYNAME                     MAKEDIPROP(20)
  1016. #define DIPROP_CPOINTS                 MAKEDIPROP(21)
  1017. #define DIPROP_APPDATA       MAKEDIPROP(22)
  1018. #define DIPROP_SCANCODE      MAKEDIPROP(23)
  1019. #define DIPROP_VIDPID           MAKEDIPROP(24)
  1020. #define DIPROP_USERNAME         MAKEDIPROP(25)
  1021. #define DIPROP_TYPENAME         MAKEDIPROP(26)
  1022. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  1023. typedef struct DIDEVICEOBJECTDATA_DX3 {
  1024.     DWORD       dwOfs;
  1025.     DWORD       dwData;
  1026.     DWORD       dwTimeStamp;
  1027.     DWORD       dwSequence;
  1028. } DIDEVICEOBJECTDATA_DX3, *LPDIDEVICEOBJECTDATA_DX3;
  1029. typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX;
  1030. typedef struct DIDEVICEOBJECTDATA {
  1031.     DWORD       dwOfs;
  1032.     DWORD       dwData;
  1033.     DWORD       dwTimeStamp;
  1034.     DWORD       dwSequence;
  1035. #if(DIRECTINPUT_VERSION >= 0x0800)
  1036.     UINT_PTR    uAppData;
  1037. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  1038. } DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
  1039. typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
  1040. #define DIGDD_PEEK          0x00000001
  1041. #define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) 
  1042.                         ((int)((dwSequence1) - (dwSequence2)) cmp 0)
  1043. #define DISCL_EXCLUSIVE     0x00000001
  1044. #define DISCL_NONEXCLUSIVE  0x00000002
  1045. #define DISCL_FOREGROUND    0x00000004
  1046. #define DISCL_BACKGROUND    0x00000008
  1047. #define DISCL_NOWINKEY      0x00000010
  1048. #if(DIRECTINPUT_VERSION >= 0x0500)
  1049. /* These structures are defined for DirectX 3.0 compatibility */
  1050. typedef struct DIDEVICEINSTANCE_DX3A {
  1051.     DWORD   dwSize;
  1052.     GUID    guidInstance;
  1053.     GUID    guidProduct;
  1054.     DWORD   dwDevType;
  1055.     CHAR    tszInstanceName[MAX_PATH];
  1056.     CHAR    tszProductName[MAX_PATH];
  1057. } DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
  1058. typedef struct DIDEVICEINSTANCE_DX3W {
  1059.     DWORD   dwSize;
  1060.     GUID    guidInstance;
  1061.     GUID    guidProduct;
  1062.     DWORD   dwDevType;
  1063.     WCHAR   tszInstanceName[MAX_PATH];
  1064.     WCHAR   tszProductName[MAX_PATH];
  1065. } DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
  1066. #ifdef UNICODE
  1067. typedef DIDEVICEINSTANCE_DX3W DIDEVICEINSTANCE_DX3;
  1068. typedef LPDIDEVICEINSTANCE_DX3W LPDIDEVICEINSTANCE_DX3;
  1069. #else
  1070. typedef DIDEVICEINSTANCE_DX3A DIDEVICEINSTANCE_DX3;
  1071. typedef LPDIDEVICEINSTANCE_DX3A LPDIDEVICEINSTANCE_DX3;
  1072. #endif // UNICODE
  1073. typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
  1074. typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
  1075. typedef const DIDEVICEINSTANCE_DX3  *LPCDIDEVICEINSTANCE_DX3;
  1076. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1077. typedef struct DIDEVICEINSTANCEA {
  1078.     DWORD   dwSize;
  1079.     GUID    guidInstance;
  1080.     GUID    guidProduct;
  1081.     DWORD   dwDevType;
  1082.     CHAR    tszInstanceName[MAX_PATH];
  1083.     CHAR    tszProductName[MAX_PATH];
  1084. #if(DIRECTINPUT_VERSION >= 0x0500)
  1085.     GUID    guidFFDriver;
  1086.     WORD    wUsagePage;
  1087.     WORD    wUsage;
  1088. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1089. } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
  1090. typedef struct DIDEVICEINSTANCEW {
  1091.     DWORD   dwSize;
  1092.     GUID    guidInstance;
  1093.     GUID    guidProduct;
  1094.     DWORD   dwDevType;
  1095.     WCHAR   tszInstanceName[MAX_PATH];
  1096.     WCHAR   tszProductName[MAX_PATH];
  1097. #if(DIRECTINPUT_VERSION >= 0x0500)
  1098.     GUID    guidFFDriver;
  1099.     WORD    wUsagePage;
  1100.     WORD    wUsage;
  1101. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1102. } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
  1103. #ifdef UNICODE
  1104. typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE;
  1105. typedef LPDIDEVICEINSTANCEW LPDIDEVICEINSTANCE;
  1106. #else
  1107. typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE;
  1108. typedef LPDIDEVICEINSTANCEA LPDIDEVICEINSTANCE;
  1109. #endif // UNICODE
  1110. typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
  1111. typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
  1112. #ifdef UNICODE
  1113. typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE;
  1114. typedef LPCDIDEVICEINSTANCEW LPCDIDEVICEINSTANCE;
  1115. #else
  1116. typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE;
  1117. typedef LPCDIDEVICEINSTANCEA LPCDIDEVICEINSTANCE;
  1118. #endif // UNICODE
  1119. typedef const DIDEVICEINSTANCE  *LPCDIDEVICEINSTANCE;
  1120. #undef INTERFACE
  1121. #define INTERFACE IDirectInputDeviceW
  1122. DECLARE_INTERFACE_(IDirectInputDeviceW, IUnknown)
  1123. {
  1124.     /*** IUnknown methods ***/
  1125.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1126.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1127.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1128.     /*** IDirectInputDeviceW methods ***/
  1129.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1130.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
  1131.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1132.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1133.     STDMETHOD(Acquire)(THIS) PURE;
  1134.     STDMETHOD(Unacquire)(THIS) PURE;
  1135.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1136.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1137.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1138.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1139.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1140.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
  1141.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
  1142.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1143.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1144. };
  1145. typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
  1146. #undef INTERFACE
  1147. #define INTERFACE IDirectInputDeviceA
  1148. DECLARE_INTERFACE_(IDirectInputDeviceA, IUnknown)
  1149. {
  1150.     /*** IUnknown methods ***/
  1151.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1152.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1153.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1154.     /*** IDirectInputDeviceA methods ***/
  1155.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1156.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
  1157.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1158.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1159.     STDMETHOD(Acquire)(THIS) PURE;
  1160.     STDMETHOD(Unacquire)(THIS) PURE;
  1161.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1162.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1163.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1164.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1165.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1166.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
  1167.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
  1168.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1169.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1170. };
  1171. typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
  1172. #ifdef UNICODE
  1173. #define IID_IDirectInputDevice IID_IDirectInputDeviceW
  1174. #define IDirectInputDevice IDirectInputDeviceW
  1175. #define IDirectInputDeviceVtbl IDirectInputDeviceWVtbl
  1176. #else
  1177. #define IID_IDirectInputDevice IID_IDirectInputDeviceA
  1178. #define IDirectInputDevice IDirectInputDeviceA
  1179. #define IDirectInputDeviceVtbl IDirectInputDeviceAVtbl
  1180. #endif
  1181. typedef struct IDirectInputDevice *LPDIRECTINPUTDEVICE;
  1182. #if !defined(__cplusplus) || defined(CINTERFACE)
  1183. #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1184. #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
  1185. #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
  1186. #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1187. #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1188. #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1189. #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1190. #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
  1191. #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1192. #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1193. #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1194. #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1195. #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1196. #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1197. #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1198. #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1199. #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1200. #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1201. #else
  1202. #define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1203. #define IDirectInputDevice_AddRef(p) (p)->AddRef()
  1204. #define IDirectInputDevice_Release(p) (p)->Release()
  1205. #define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1206. #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1207. #define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1208. #define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1209. #define IDirectInputDevice_Acquire(p) (p)->Acquire()
  1210. #define IDirectInputDevice_Unacquire(p) (p)->Unacquire()
  1211. #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1212. #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1213. #define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1214. #define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1215. #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1216. #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1217. #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1218. #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1219. #define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1220. #endif
  1221. #endif /* DIJ_RINGZERO */
  1222. #if(DIRECTINPUT_VERSION >= 0x0500)
  1223. #define DISFFC_RESET            0x00000001
  1224. #define DISFFC_STOPALL          0x00000002
  1225. #define DISFFC_PAUSE            0x00000004
  1226. #define DISFFC_CONTINUE         0x00000008
  1227. #define DISFFC_SETACTUATORSON   0x00000010
  1228. #define DISFFC_SETACTUATORSOFF  0x00000020
  1229. #define DIGFFS_EMPTY            0x00000001
  1230. #define DIGFFS_STOPPED          0x00000002
  1231. #define DIGFFS_PAUSED           0x00000004
  1232. #define DIGFFS_ACTUATORSON      0x00000010
  1233. #define DIGFFS_ACTUATORSOFF     0x00000020
  1234. #define DIGFFS_POWERON          0x00000040
  1235. #define DIGFFS_POWEROFF         0x00000080
  1236. #define DIGFFS_SAFETYSWITCHON   0x00000100
  1237. #define DIGFFS_SAFETYSWITCHOFF  0x00000200
  1238. #define DIGFFS_USERFFSWITCHON   0x00000400
  1239. #define DIGFFS_USERFFSWITCHOFF  0x00000800
  1240. #define DIGFFS_DEVICELOST       0x80000000
  1241. #ifndef DIJ_RINGZERO
  1242. typedef struct DIEFFECTINFOA {
  1243.     DWORD   dwSize;
  1244.     GUID    guid;
  1245.     DWORD   dwEffType;
  1246.     DWORD   dwStaticParams;
  1247.     DWORD   dwDynamicParams;
  1248.     CHAR    tszName[MAX_PATH];
  1249. } DIEFFECTINFOA, *LPDIEFFECTINFOA;
  1250. typedef struct DIEFFECTINFOW {
  1251.     DWORD   dwSize;
  1252.     GUID    guid;
  1253.     DWORD   dwEffType;
  1254.     DWORD   dwStaticParams;
  1255.     DWORD   dwDynamicParams;
  1256.     WCHAR   tszName[MAX_PATH];
  1257. } DIEFFECTINFOW, *LPDIEFFECTINFOW;
  1258. #ifdef UNICODE
  1259. typedef DIEFFECTINFOW DIEFFECTINFO;
  1260. typedef LPDIEFFECTINFOW LPDIEFFECTINFO;
  1261. #else
  1262. typedef DIEFFECTINFOA DIEFFECTINFO;
  1263. typedef LPDIEFFECTINFOA LPDIEFFECTINFO;
  1264. #endif // UNICODE
  1265. typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
  1266. typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
  1267. typedef const DIEFFECTINFO  *LPCDIEFFECTINFO;
  1268. #define DISDD_CONTINUE          0x00000001
  1269. typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
  1270. typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
  1271. #ifdef UNICODE
  1272. #define LPDIENUMEFFECTSCALLBACK  LPDIENUMEFFECTSCALLBACKW
  1273. #else
  1274. #define LPDIENUMEFFECTSCALLBACK  LPDIENUMEFFECTSCALLBACKA
  1275. #endif // !UNICODE
  1276. typedef BOOL (FAR PASCAL * LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
  1277. #undef INTERFACE
  1278. #define INTERFACE IDirectInputDevice2W
  1279. DECLARE_INTERFACE_(IDirectInputDevice2W, IDirectInputDeviceW)
  1280. {
  1281.     /*** IUnknown methods ***/
  1282.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1283.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1284.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1285.     /*** IDirectInputDeviceW methods ***/
  1286.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1287.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
  1288.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1289.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1290.     STDMETHOD(Acquire)(THIS) PURE;
  1291.     STDMETHOD(Unacquire)(THIS) PURE;
  1292.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1293.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1294.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1295.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1296.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1297.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
  1298.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
  1299.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1300.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1301.     /*** IDirectInputDevice2W methods ***/
  1302.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1303.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
  1304.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
  1305.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1306.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1307.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1308.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1309.     STDMETHOD(Poll)(THIS) PURE;
  1310.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1311. };
  1312. typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
  1313. #undef INTERFACE
  1314. #define INTERFACE IDirectInputDevice2A
  1315. DECLARE_INTERFACE_(IDirectInputDevice2A, IDirectInputDeviceA)
  1316. {
  1317.     /*** IUnknown methods ***/
  1318.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1319.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1320.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1321.     /*** IDirectInputDeviceA methods ***/
  1322.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1323.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
  1324.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1325.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1326.     STDMETHOD(Acquire)(THIS) PURE;
  1327.     STDMETHOD(Unacquire)(THIS) PURE;
  1328.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1329.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1330.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1331.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1332.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1333.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
  1334.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
  1335.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1336.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1337.     /*** IDirectInputDevice2A methods ***/
  1338.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1339.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
  1340.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
  1341.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1342.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1343.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1344.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1345.     STDMETHOD(Poll)(THIS) PURE;
  1346.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1347. };
  1348. typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
  1349. #ifdef UNICODE
  1350. #define IID_IDirectInputDevice2 IID_IDirectInputDevice2W
  1351. #define IDirectInputDevice2 IDirectInputDevice2W
  1352. #define IDirectInputDevice2Vtbl IDirectInputDevice2WVtbl
  1353. #else
  1354. #define IID_IDirectInputDevice2 IID_IDirectInputDevice2A
  1355. #define IDirectInputDevice2 IDirectInputDevice2A
  1356. #define IDirectInputDevice2Vtbl IDirectInputDevice2AVtbl
  1357. #endif
  1358. typedef struct IDirectInputDevice2 *LPDIRECTINPUTDEVICE2;
  1359. #if !defined(__cplusplus) || defined(CINTERFACE)
  1360. #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1361. #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1362. #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
  1363. #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1364. #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1365. #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1366. #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1367. #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
  1368. #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1369. #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1370. #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1371. #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1372. #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1373. #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1374. #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1375. #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1376. #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1377. #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1378. #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1379. #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1380. #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1381. #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1382. #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1383. #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1384. #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1385. #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
  1386. #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1387. #else
  1388. #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1389. #define IDirectInputDevice2_AddRef(p) (p)->AddRef()
  1390. #define IDirectInputDevice2_Release(p) (p)->Release()
  1391. #define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1392. #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1393. #define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1394. #define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1395. #define IDirectInputDevice2_Acquire(p) (p)->Acquire()
  1396. #define IDirectInputDevice2_Unacquire(p) (p)->Unacquire()
  1397. #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1398. #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1399. #define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1400. #define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1401. #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1402. #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1403. #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1404. #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1405. #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1406. #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1407. #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1408. #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1409. #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1410. #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1411. #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1412. #define IDirectInputDevice2_Escape(p,a) (p)->Escape(a)
  1413. #define IDirectInputDevice2_Poll(p) (p)->Poll()
  1414. #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1415. #endif
  1416. #endif /* DIJ_RINGZERO */
  1417. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1418. #if(DIRECTINPUT_VERSION >= 0x0700)
  1419. #define DIFEF_DEFAULT               0x00000000
  1420. #define DIFEF_INCLUDENONSTANDARD    0x00000001
  1421. #define DIFEF_MODIFYIFNEEDED            0x00000010
  1422. #ifndef DIJ_RINGZERO
  1423. #undef INTERFACE
  1424. #define INTERFACE IDirectInputDevice7W
  1425. DECLARE_INTERFACE_(IDirectInputDevice7W, IDirectInputDevice2W)
  1426. {
  1427.     /*** IUnknown methods ***/
  1428.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1429.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1430.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1431.     /*** IDirectInputDevice2W methods ***/
  1432.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1433.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
  1434.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1435.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1436.     STDMETHOD(Acquire)(THIS) PURE;
  1437.     STDMETHOD(Unacquire)(THIS) PURE;
  1438.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1439.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1440.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1441.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1442.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1443.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
  1444.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
  1445.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1446.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1447.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1448.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
  1449.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
  1450.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1451.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1452.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1453.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1454.     STDMETHOD(Poll)(THIS) PURE;
  1455.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1456.     /*** IDirectInputDevice7W methods ***/
  1457.     STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
  1458.     STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
  1459. };
  1460. typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
  1461. #undef INTERFACE
  1462. #define INTERFACE IDirectInputDevice7A
  1463. DECLARE_INTERFACE_(IDirectInputDevice7A, IDirectInputDevice2A)
  1464. {
  1465.     /*** IUnknown methods ***/
  1466.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1467.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1468.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1469.     /*** IDirectInputDevice2A methods ***/
  1470.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1471.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
  1472.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1473.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1474.     STDMETHOD(Acquire)(THIS) PURE;
  1475.     STDMETHOD(Unacquire)(THIS) PURE;
  1476.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1477.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1478.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1479.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1480.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1481.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
  1482.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
  1483.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1484.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1485.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1486.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
  1487.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
  1488.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1489.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1490.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1491.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1492.     STDMETHOD(Poll)(THIS) PURE;
  1493.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1494.     /*** IDirectInputDevice7A methods ***/
  1495.     STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
  1496.     STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
  1497. };
  1498. typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
  1499. #ifdef UNICODE
  1500. #define IID_IDirectInputDevice7 IID_IDirectInputDevice7W
  1501. #define IDirectInputDevice7 IDirectInputDevice7W
  1502. #define IDirectInputDevice7Vtbl IDirectInputDevice7WVtbl
  1503. #else
  1504. #define IID_IDirectInputDevice7 IID_IDirectInputDevice7A
  1505. #define IDirectInputDevice7 IDirectInputDevice7A
  1506. #define IDirectInputDevice7Vtbl IDirectInputDevice7AVtbl
  1507. #endif
  1508. typedef struct IDirectInputDevice7 *LPDIRECTINPUTDEVICE7;
  1509. #if !defined(__cplusplus) || defined(CINTERFACE)
  1510. #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1511. #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1512. #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
  1513. #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1514. #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1515. #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1516. #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1517. #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
  1518. #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1519. #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1520. #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1521. #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1522. #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1523. #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1524. #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1525. #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1526. #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1527. #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1528. #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1529. #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1530. #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1531. #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1532. #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1533. #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1534. #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1535. #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
  1536. #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1537. #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
  1538. #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
  1539. #else
  1540. #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1541. #define IDirectInputDevice7_AddRef(p) (p)->AddRef()
  1542. #define IDirectInputDevice7_Release(p) (p)->Release()
  1543. #define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1544. #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1545. #define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1546. #define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1547. #define IDirectInputDevice7_Acquire(p) (p)->Acquire()
  1548. #define IDirectInputDevice7_Unacquire(p) (p)->Unacquire()
  1549. #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1550. #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1551. #define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1552. #define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1553. #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1554. #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1555. #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1556. #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1557. #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1558. #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1559. #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1560. #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1561. #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1562. #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1563. #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1564. #define IDirectInputDevice7_Escape(p,a) (p)->Escape(a)
  1565. #define IDirectInputDevice7_Poll(p) (p)->Poll()
  1566. #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1567. #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
  1568. #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
  1569. #endif
  1570. #endif /* DIJ_RINGZERO */
  1571. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  1572. #if(DIRECTINPUT_VERSION >= 0x0800)
  1573. #ifndef DIJ_RINGZERO
  1574. #undef INTERFACE
  1575. #define INTERFACE IDirectInputDevice8W
  1576. DECLARE_INTERFACE_(IDirectInputDevice8W, IUnknown)
  1577. {
  1578.     /*** IUnknown methods ***/
  1579.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1580.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1581.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1582.     /*** IDirectInputDevice8W methods ***/
  1583.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1584.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
  1585.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1586.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1587.     STDMETHOD(Acquire)(THIS) PURE;
  1588.     STDMETHOD(Unacquire)(THIS) PURE;
  1589.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1590.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1591.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1592.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1593.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1594.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
  1595.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
  1596.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1597.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1598.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1599.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
  1600.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
  1601.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1602.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1603.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1604.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1605.     STDMETHOD(Poll)(THIS) PURE;
  1606.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1607.     STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
  1608.     STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
  1609.     STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE;
  1610.     STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE;
  1611.     STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW) PURE;
  1612. };
  1613. typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
  1614. #undef INTERFACE
  1615. #define INTERFACE IDirectInputDevice8A
  1616. DECLARE_INTERFACE_(IDirectInputDevice8A, IUnknown)
  1617. {
  1618.     /*** IUnknown methods ***/
  1619.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1620.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1621.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1622.     /*** IDirectInputDevice8A methods ***/
  1623.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1624.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
  1625.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1626.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1627.     STDMETHOD(Acquire)(THIS) PURE;
  1628.     STDMETHOD(Unacquire)(THIS) PURE;
  1629.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1630.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1631.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1632.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1633.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1634.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
  1635.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
  1636.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1637.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1638.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1639.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
  1640.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
  1641.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1642.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1643.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1644.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1645.     STDMETHOD(Poll)(THIS) PURE;
  1646.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1647.     STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
  1648.     STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
  1649.     STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE;
  1650.     STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE;
  1651.     STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA) PURE;
  1652. };
  1653. typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
  1654. #ifdef UNICODE
  1655. #define IID_IDirectInputDevice8 IID_IDirectInputDevice8W
  1656. #define IDirectInputDevice8 IDirectInputDevice8W
  1657. #define IDirectInputDevice8Vtbl IDirectInputDevice8WVtbl
  1658. #else
  1659. #define IID_IDirectInputDevice8 IID_IDirectInputDevice8A
  1660. #define IDirectInputDevice8 IDirectInputDevice8A
  1661. #define IDirectInputDevice8Vtbl IDirectInputDevice8AVtbl
  1662. #endif
  1663. typedef struct IDirectInputDevice8 *LPDIRECTINPUTDEVICE8;
  1664. #if !defined(__cplusplus) || defined(CINTERFACE)
  1665. #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1666. #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
  1667. #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
  1668. #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1669. #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1670. #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1671. #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1672. #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
  1673. #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1674. #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1675. #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1676. #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1677. #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1678. #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1679. #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1680. #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1681. #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1682. #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1683. #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1684. #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1685. #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1686. #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1687. #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1688. #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1689. #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1690. #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
  1691. #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1692. #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
  1693. #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
  1694. #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
  1695. #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
  1696. #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
  1697. #else
  1698. #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1699. #define IDirectInputDevice8_AddRef(p) (p)->AddRef()
  1700. #define IDirectInputDevice8_Release(p) (p)->Release()
  1701. #define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1702. #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1703. #define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1704. #define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1705. #define IDirectInputDevice8_Acquire(p) (p)->Acquire()
  1706. #define IDirectInputDevice8_Unacquire(p) (p)->Unacquire()
  1707. #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1708. #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1709. #define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1710. #define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1711. #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1712. #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1713. #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1714. #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1715. #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1716. #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1717. #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1718. #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1719. #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1720. #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1721. #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1722. #define IDirectInputDevice8_Escape(p,a) (p)->Escape(a)
  1723. #define IDirectInputDevice8_Poll(p) (p)->Poll()
  1724. #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1725. #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
  1726. #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
  1727. #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
  1728. #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c)
  1729. #define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a)
  1730. #endif
  1731. #endif /* DIJ_RINGZERO */
  1732. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  1733. /****************************************************************************
  1734.  *
  1735.  *      Mouse
  1736.  *
  1737.  ****************************************************************************/
  1738. #ifndef DIJ_RINGZERO
  1739. typedef struct _DIMOUSESTATE {
  1740.     LONG    lX;
  1741.     LONG    lY;
  1742.     LONG    lZ;
  1743.     BYTE    rgbButtons[4];
  1744. } DIMOUSESTATE, *LPDIMOUSESTATE;
  1745. #if DIRECTINPUT_VERSION >= 0x0700
  1746. typedef struct _DIMOUSESTATE2 {
  1747.     LONG    lX;
  1748.     LONG    lY;
  1749.     LONG    lZ;
  1750.     BYTE    rgbButtons[8];
  1751. } DIMOUSESTATE2, *LPDIMOUSESTATE2;
  1752. #endif
  1753. #define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)
  1754. #define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)
  1755. #define DIMOFS_Z        FIELD_OFFSET(DIMOUSESTATE, lZ)
  1756. #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
  1757. #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
  1758. #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
  1759. #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
  1760. #if (DIRECTINPUT_VERSION >= 0x0700)
  1761. #define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
  1762. #define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
  1763. #define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
  1764. #define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
  1765. #endif
  1766. #endif /* DIJ_RINGZERO */
  1767. /****************************************************************************
  1768.  *
  1769.  *      Keyboard
  1770.  *
  1771.  ****************************************************************************/
  1772. #ifndef DIJ_RINGZERO
  1773. /****************************************************************************
  1774.  *
  1775.  *      DirectInput keyboard scan codes
  1776.  *
  1777.  ****************************************************************************/
  1778. #define DIK_ESCAPE          0x01
  1779. #define DIK_1               0x02
  1780. #define DIK_2               0x03
  1781. #define DIK_3               0x04
  1782. #define DIK_4               0x05
  1783. #define DIK_5               0x06
  1784. #define DIK_6               0x07
  1785. #define DIK_7               0x08
  1786. #define DIK_8               0x09
  1787. #define DIK_9               0x0A
  1788. #define DIK_0               0x0B
  1789. #define DIK_MINUS           0x0C    /* - on main keyboard */
  1790. #define DIK_EQUALS          0x0D
  1791. #define DIK_BACK            0x0E    /* backspace */
  1792. #define DIK_TAB             0x0F
  1793. #define DIK_Q               0x10
  1794. #define DIK_W               0x11
  1795. #define DIK_E               0x12
  1796. #define DIK_R               0x13
  1797. #define DIK_T               0x14
  1798. #define DIK_Y               0x15
  1799. #define DIK_U               0x16
  1800. #define DIK_I               0x17
  1801. #define DIK_O               0x18
  1802. #define DIK_P               0x19
  1803. #define DIK_LBRACKET        0x1A
  1804. #define DIK_RBRACKET        0x1B
  1805. #define DIK_RETURN          0x1C    /* Enter on main keyboard */
  1806. #define DIK_LCONTROL        0x1D
  1807. #define DIK_A               0x1E
  1808. #define DIK_S               0x1F
  1809. #define DIK_D               0x20
  1810. #define DIK_F               0x21
  1811. #define DIK_G               0x22
  1812. #define DIK_H               0x23
  1813. #define DIK_J               0x24
  1814. #define DIK_K               0x25
  1815. #define DIK_L               0x26
  1816. #define DIK_SEMICOLON       0x27
  1817. #define DIK_APOSTROPHE      0x28
  1818. #define DIK_GRAVE           0x29    /* accent grave */
  1819. #define DIK_LSHIFT          0x2A
  1820. #define DIK_BACKSLASH       0x2B
  1821. #define DIK_Z               0x2C
  1822. #define DIK_X               0x2D
  1823. #define DIK_C               0x2E
  1824. #define DIK_V               0x2F
  1825. #define DIK_B               0x30
  1826. #define DIK_N               0x31
  1827. #define DIK_M               0x32
  1828. #define DIK_COMMA           0x33
  1829. #define DIK_PERIOD          0x34    /* . on main keyboard */
  1830. #define DIK_SLASH           0x35    /* / on main keyboard */
  1831. #define DIK_RSHIFT          0x36
  1832. #define DIK_MULTIPLY        0x37    /* * on numeric keypad */
  1833. #define DIK_LMENU           0x38    /* left Alt */
  1834. #define DIK_SPACE           0x39
  1835. #define DIK_CAPITAL         0x3A
  1836. #define DIK_F1              0x3B
  1837. #define DIK_F2              0x3C
  1838. #define DIK_F3              0x3D
  1839. #define DIK_F4              0x3E
  1840. #define DIK_F5              0x3F
  1841. #define DIK_F6              0x40
  1842. #define DIK_F7              0x41
  1843. #define DIK_F8              0x42
  1844. #define DIK_F9              0x43
  1845. #define DIK_F10             0x44
  1846. #define DIK_NUMLOCK         0x45
  1847. #define DIK_SCROLL          0x46    /* Scroll Lock */
  1848. #define DIK_NUMPAD7         0x47
  1849. #define DIK_NUMPAD8         0x48
  1850. #define DIK_NUMPAD9         0x49
  1851. #define DIK_SUBTRACT        0x4A    /* - on numeric keypad */
  1852. #define DIK_NUMPAD4         0x4B
  1853. #define DIK_NUMPAD5         0x4C
  1854. #define DIK_NUMPAD6         0x4D
  1855. #define DIK_ADD             0x4E    /* + on numeric keypad */
  1856. #define DIK_NUMPAD1         0x4F
  1857. #define DIK_NUMPAD2         0x50
  1858. #define DIK_NUMPAD3         0x51
  1859. #define DIK_NUMPAD0         0x52
  1860. #define DIK_DECIMAL         0x53    /* . on numeric keypad */
  1861. #define DIK_OEM_102         0x56    /* <> or | on RT 102-key keyboard (Non-U.S.) */
  1862. #define DIK_F11             0x57
  1863. #define DIK_F12             0x58
  1864. #define DIK_F13             0x64    /*                     (NEC PC98) */
  1865. #define DIK_F14             0x65    /*                     (NEC PC98) */
  1866. #define DIK_F15             0x66    /*                     (NEC PC98) */
  1867. #define DIK_KANA            0x70    /* (Japanese keyboard)            */
  1868. #define DIK_ABNT_C1         0x73    /* /? on Brazilian keyboard */
  1869. #define DIK_CONVERT         0x79    /* (Japanese keyboard)            */
  1870. #define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */
  1871. #define DIK_YEN             0x7D    /* (Japanese keyboard)            */
  1872. #define DIK_ABNT_C2         0x7E    /* Numpad . on Brazilian keyboard */
  1873. #define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */
  1874. #define DIK_PREVTRACK       0x90    /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
  1875. #define DIK_AT              0x91    /*                     (NEC PC98) */
  1876. #define DIK_COLON           0x92    /*                     (NEC PC98) */
  1877. #define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */
  1878. #define DIK_KANJI           0x94    /* (Japanese keyboard)            */
  1879. #define DIK_STOP            0x95    /*                     (NEC PC98) */
  1880. #define DIK_AX              0x96    /*                     (Japan AX) */
  1881. #define DIK_UNLABELED       0x97    /*                        (J3100) */
  1882. #define DIK_NEXTTRACK       0x99    /* Next Track */
  1883. #define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */
  1884. #define DIK_RCONTROL        0x9D
  1885. #define DIK_MUTE            0xA0    /* Mute */
  1886. #define DIK_CALCULATOR      0xA1    /* Calculator */
  1887. #define DIK_PLAYPAUSE       0xA2    /* Play / Pause */
  1888. #define DIK_MEDIASTOP       0xA4    /* Media Stop */
  1889. #define DIK_VOLUMEDOWN      0xAE    /* Volume - */
  1890. #define DIK_VOLUMEUP        0xB0    /* Volume + */
  1891. #define DIK_WEBHOME         0xB2    /* Web home */
  1892. #define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */
  1893. #define DIK_DIVIDE          0xB5    /* / on numeric keypad */
  1894. #define DIK_SYSRQ           0xB7
  1895. #define DIK_RMENU           0xB8    /* right Alt */
  1896. #define DIK_PAUSE           0xC5    /* Pause */
  1897. #define DIK_HOME            0xC7    /* Home on arrow keypad */
  1898. #define DIK_UP              0xC8    /* UpArrow on arrow keypad */
  1899. #define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */
  1900. #define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */
  1901. #define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */
  1902. #define DIK_END             0xCF    /* End on arrow keypad */
  1903. #define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */
  1904. #define DIK_NEXT            0xD1    /* PgDn on arrow keypad */
  1905. #define DIK_INSERT          0xD2    /* Insert on arrow keypad */
  1906. #define DIK_DELETE          0xD3    /* Delete on arrow keypad */
  1907. #define DIK_LWIN            0xDB    /* Left Windows key */
  1908. #define DIK_RWIN            0xDC    /* Right Windows key */
  1909. #define DIK_APPS            0xDD    /* AppMenu key */
  1910. #define DIK_POWER           0xDE    /* System Power */
  1911. #define DIK_SLEEP           0xDF    /* System Sleep */
  1912. #define DIK_WAKE            0xE3    /* System Wake */
  1913. #define DIK_WEBSEARCH       0xE5    /* Web Search */
  1914. #define DIK_WEBFAVORITES    0xE6    /* Web Favorites */
  1915. #define DIK_WEBREFRESH      0xE7    /* Web Refresh */
  1916. #define DIK_WEBSTOP         0xE8    /* Web Stop */
  1917. #define DIK_WEBFORWARD      0xE9    /* Web Forward */
  1918. #define DIK_WEBBACK         0xEA    /* Web Back */
  1919. #define DIK_MYCOMPUTER      0xEB    /* My Computer */
  1920. #define DIK_MAIL            0xEC    /* Mail */
  1921. #define DIK_MEDIASELECT     0xED    /* Media Select */
  1922. /*
  1923.  *  Alternate names for keys, to facilitate transition from DOS.
  1924.  */
  1925. #define DIK_BACKSPACE       DIK_BACK            /* backspace */
  1926. #define DIK_NUMPADSTAR      DIK_MULTIPLY        /* * on numeric keypad */
  1927. #define DIK_LALT            DIK_LMENU           /* left Alt */
  1928. #define DIK_CAPSLOCK        DIK_CAPITAL         /* CapsLock */
  1929. #define DIK_NUMPADMINUS     DIK_SUBTRACT        /* - on numeric keypad */
  1930. #define DIK_NUMPADPLUS      DIK_ADD             /* + on numeric keypad */
  1931. #define DIK_NUMPADPERIOD    DIK_DECIMAL         /* . on numeric keypad */
  1932. #define DIK_NUMPADSLASH     DIK_DIVIDE          /* / on numeric keypad */
  1933. #define DIK_RALT            DIK_RMENU           /* right Alt */
  1934. #define DIK_UPARROW         DIK_UP              /* UpArrow on arrow keypad */
  1935. #define DIK_PGUP            DIK_PRIOR           /* PgUp on arrow keypad */
  1936. #define DIK_LEFTARROW       DIK_LEFT            /* LeftArrow on arrow keypad */
  1937. #define DIK_RIGHTARROW      DIK_RIGHT           /* RightArrow on arrow keypad */
  1938. #define DIK_DOWNARROW       DIK_DOWN            /* DownArrow on arrow keypad */
  1939. #define DIK_PGDN            DIK_NEXT            /* PgDn on arrow keypad */
  1940. /*
  1941.  *  Alternate names for keys originally not used on US keyboards.
  1942.  */
  1943. #define DIK_CIRCUMFLEX      DIK_PREVTRACK       /* Japanese keyboard */
  1944. #endif /* DIJ_RINGZERO */
  1945. /****************************************************************************