dinputd.h 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. /****************************************************************************
  2. *
  3. * Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dinputd.h
  6. * Content: DirectInput include file for device driver implementors
  7. *
  8. ****************************************************************************/
  9. #ifndef __DINPUTD_INCLUDED__
  10. #define __DINPUTD_INCLUDED__
  11. #include <winapifamily.h>
  12. #ifndef DIRECTINPUT_VERSION
  13. #define DIRECTINPUT_VERSION 0x0800
  14. #pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
  15. #endif
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #pragma region Desktop Family
  20. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  21. /****************************************************************************
  22. *
  23. * Interfaces
  24. *
  25. ****************************************************************************/
  26. #ifndef DIJ_RINGZERO
  27. DEFINE_GUID(IID_IDirectInputEffectDriver, 0x02538130,0x898F,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  28. DEFINE_GUID(IID_IDirectInputJoyConfig, 0x1DE12AB1,0xC9F5,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  29. DEFINE_GUID(IID_IDirectInputPIDDriver, 0xEEC6993A,0xB3FD,0x11D2,0xA9,0x16,0x00,0xC0,0x4F,0xB9,0x86,0x38);
  30. DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xeb0d7dfa,0x1990,0x4f27,0xb4,0xd6,0xed,0xf2,0xee,0xc4,0xa4,0x4c);
  31. #endif /* DIJ_RINGZERO */
  32. /****************************************************************************
  33. *
  34. * IDirectInputEffectDriver
  35. *
  36. ****************************************************************************/
  37. typedef struct DIOBJECTATTRIBUTES {
  38. DWORD dwFlags;
  39. WORD wUsagePage;
  40. WORD wUsage;
  41. } DIOBJECTATTRIBUTES, *LPDIOBJECTATTRIBUTES;
  42. typedef const DIOBJECTATTRIBUTES *LPCDIOBJECTATTRIBUTES;
  43. typedef struct DIFFOBJECTATTRIBUTES {
  44. DWORD dwFFMaxForce;
  45. DWORD dwFFForceResolution;
  46. } DIFFOBJECTATTRIBUTES, *LPDIFFOBJECTATTRIBUTES;
  47. typedef const DIFFOBJECTATTRIBUTES *LPCDIFFOBJECTATTRIBUTES;
  48. typedef struct DIOBJECTCALIBRATION {
  49. LONG lMin;
  50. LONG lCenter;
  51. LONG lMax;
  52. } DIOBJECTCALIBRATION, *LPDIOBJECTCALIBRATION;
  53. typedef const DIOBJECTCALIBRATION *LPCDIOBJECTCALIBRATION;
  54. typedef struct DIPOVCALIBRATION {
  55. LONG lMin[5];
  56. LONG lMax[5];
  57. } DIPOVCALIBRATION, *LPDIPOVCALIBRATION;
  58. typedef const DIPOVCALIBRATION *LPCDIPOVCALIBRATION;
  59. typedef struct DIEFFECTATTRIBUTES {
  60. DWORD dwEffectId;
  61. DWORD dwEffType;
  62. DWORD dwStaticParams;
  63. DWORD dwDynamicParams;
  64. DWORD dwCoords;
  65. } DIEFFECTATTRIBUTES, *LPDIEFFECTATTRIBUTES;
  66. typedef const DIEFFECTATTRIBUTES *LPCDIEFFECTATTRIBUTES;
  67. typedef struct DIFFDEVICEATTRIBUTES {
  68. DWORD dwFlags;
  69. DWORD dwFFSamplePeriod;
  70. DWORD dwFFMinTimeResolution;
  71. } DIFFDEVICEATTRIBUTES, *LPDIFFDEVICEATTRIBUTES;
  72. typedef const DIFFDEVICEATTRIBUTES *LPCDIFFDEVICEATTRIBUTES;
  73. typedef struct DIDRIVERVERSIONS {
  74. DWORD dwSize;
  75. DWORD dwFirmwareRevision;
  76. DWORD dwHardwareRevision;
  77. DWORD dwFFDriverVersion;
  78. } DIDRIVERVERSIONS, *LPDIDRIVERVERSIONS;
  79. typedef const DIDRIVERVERSIONS *LPCDIDRIVERVERSIONS;
  80. typedef struct DIDEVICESTATE {
  81. DWORD dwSize;
  82. DWORD dwState;
  83. DWORD dwLoad;
  84. } DIDEVICESTATE, *LPDIDEVICESTATE;
  85. #define DEV_STS_EFFECT_RUNNING DIEGES_PLAYING
  86. #ifndef DIJ_RINGZERO
  87. typedef struct DIHIDFFINITINFO {
  88. DWORD dwSize;
  89. LPWSTR pwszDeviceInterface;
  90. GUID GuidInstance;
  91. } DIHIDFFINITINFO, *LPDIHIDFFINITINFO;
  92. #undef INTERFACE
  93. #define INTERFACE IDirectInputEffectDriver
  94. DECLARE_INTERFACE_(IDirectInputEffectDriver, IUnknown)
  95. {
  96. /*** IUnknown methods ***/
  97. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  98. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  99. STDMETHOD_(ULONG,Release)(THIS) PURE;
  100. /*** IDirectInputEffectDriver methods ***/
  101. STDMETHOD(DeviceID)(THIS_ DWORD,DWORD,DWORD,DWORD,LPVOID) PURE;
  102. STDMETHOD(GetVersions)(THIS_ LPDIDRIVERVERSIONS) PURE;
  103. STDMETHOD(Escape)(THIS_ DWORD,DWORD,LPDIEFFESCAPE) PURE;
  104. STDMETHOD(SetGain)(THIS_ DWORD,DWORD) PURE;
  105. STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD,DWORD) PURE;
  106. STDMETHOD(GetForceFeedbackState)(THIS_ DWORD,LPDIDEVICESTATE) PURE;
  107. STDMETHOD(DownloadEffect)(THIS_ DWORD,DWORD,LPDWORD,LPCDIEFFECT,DWORD) PURE;
  108. STDMETHOD(DestroyEffect)(THIS_ DWORD,DWORD) PURE;
  109. STDMETHOD(StartEffect)(THIS_ DWORD,DWORD,DWORD,DWORD) PURE;
  110. STDMETHOD(StopEffect)(THIS_ DWORD,DWORD) PURE;
  111. STDMETHOD(GetEffectStatus)(THIS_ DWORD,DWORD,LPDWORD) PURE;
  112. };
  113. typedef struct IDirectInputEffectDriver *LPDIRECTINPUTEFFECTDRIVER;
  114. #if !defined(__cplusplus) || defined(CINTERFACE)
  115. #define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  116. #define IDirectInputEffectDriver_AddRef(p) (p)->lpVtbl->AddRef(p)
  117. #define IDirectInputEffectDriver_Release(p) (p)->lpVtbl->Release(p)
  118. #define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->lpVtbl->DeviceID(p,a,b,c,d,e)
  119. #define IDirectInputEffectDriver_GetVersions(p,a) (p)->lpVtbl->GetVersions(p,a)
  120. #define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->lpVtbl->Escape(p,a,b,c)
  121. #define IDirectInputEffectDriver_SetGain(p,a,b) (p)->lpVtbl->SetGain(p,a,b)
  122. #define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->lpVtbl->SendForceFeedbackCommand(p,a,b)
  123. #define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->lpVtbl->GetForceFeedbackState(p,a,b)
  124. #define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->lpVtbl->DownloadEffect(p,a,b,c,d,e)
  125. #define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->lpVtbl->DestroyEffect(p,a,b)
  126. #define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->lpVtbl->StartEffect(p,a,b,c,d)
  127. #define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->lpVtbl->StopEffect(p,a,b)
  128. #define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->lpVtbl->GetEffectStatus(p,a,b,c)
  129. #else
  130. #define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  131. #define IDirectInputEffectDriver_AddRef(p) (p)->AddRef()
  132. #define IDirectInputEffectDriver_Release(p) (p)->Release()
  133. #define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->DeviceID(a,b,c,d,e)
  134. #define IDirectInputEffectDriver_GetVersions(p,a) (p)->GetVersions(a)
  135. #define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->Escape(a,b,c)
  136. #define IDirectInputEffectDriver_SetGain(p,a,b) (p)->SetGain(a,b)
  137. #define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->SendForceFeedbackCommand(a,b)
  138. #define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->GetForceFeedbackState(a,b)
  139. #define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->DownloadEffect(a,b,c,d,e)
  140. #define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->DestroyEffect(a,b)
  141. #define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->StartEffect(a,b,c,d)
  142. #define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->StopEffect(a,b)
  143. #define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->GetEffectStatus(a,b,c)
  144. #endif
  145. #endif /* DIJ_RINGZERO */
  146. /****************************************************************************
  147. *
  148. * IDirectInputJoyConfig
  149. *
  150. ****************************************************************************/
  151. /****************************************************************************
  152. *
  153. * Definitions copied from the DDK
  154. *
  155. ****************************************************************************/
  156. #ifndef JOY_HW_NONE
  157. /* pre-defined joystick types */
  158. #define JOY_HW_NONE 0
  159. #define JOY_HW_CUSTOM 1
  160. #define JOY_HW_2A_2B_GENERIC 2
  161. #define JOY_HW_2A_4B_GENERIC 3
  162. #define JOY_HW_2B_GAMEPAD 4
  163. #define JOY_HW_2B_FLIGHTYOKE 5
  164. #define JOY_HW_2B_FLIGHTYOKETHROTTLE 6
  165. #define JOY_HW_3A_2B_GENERIC 7
  166. #define JOY_HW_3A_4B_GENERIC 8
  167. #define JOY_HW_4B_GAMEPAD 9
  168. #define JOY_HW_4B_FLIGHTYOKE 10
  169. #define JOY_HW_4B_FLIGHTYOKETHROTTLE 11
  170. #define JOY_HW_TWO_2A_2B_WITH_Y 12
  171. #define JOY_HW_LASTENTRY 13
  172. /* calibration flags */
  173. #define JOY_ISCAL_XY 0x00000001l /* XY are calibrated */
  174. #define JOY_ISCAL_Z 0x00000002l /* Z is calibrated */
  175. #define JOY_ISCAL_R 0x00000004l /* R is calibrated */
  176. #define JOY_ISCAL_U 0x00000008l /* U is calibrated */
  177. #define JOY_ISCAL_V 0x00000010l /* V is calibrated */
  178. #define JOY_ISCAL_POV 0x00000020l /* POV is calibrated */
  179. /* point of view constants */
  180. #define JOY_POV_NUMDIRS 4
  181. #define JOY_POVVAL_FORWARD 0
  182. #define JOY_POVVAL_BACKWARD 1
  183. #define JOY_POVVAL_LEFT 2
  184. #define JOY_POVVAL_RIGHT 3
  185. /* Specific settings for joystick hardware */
  186. #define JOY_HWS_HASZ 0x00000001l /* has Z info? */
  187. #define JOY_HWS_HASPOV 0x00000002l /* point of view hat present */
  188. #define JOY_HWS_POVISBUTTONCOMBOS 0x00000004l /* pov done through combo of buttons */
  189. #define JOY_HWS_POVISPOLL 0x00000008l /* pov done through polling */
  190. #define JOY_HWS_ISYOKE 0x00000010l /* joystick is a flight yoke */
  191. #define JOY_HWS_ISGAMEPAD 0x00000020l /* joystick is a game pad */
  192. #define JOY_HWS_ISCARCTRL 0x00000040l /* joystick is a car controller */
  193. /* X defaults to J1 X axis */
  194. #define JOY_HWS_XISJ1Y 0x00000080l /* X is on J1 Y axis */
  195. #define JOY_HWS_XISJ2X 0x00000100l /* X is on J2 X axis */
  196. #define JOY_HWS_XISJ2Y 0x00000200l /* X is on J2 Y axis */
  197. /* Y defaults to J1 Y axis */
  198. #define JOY_HWS_YISJ1X 0x00000400l /* Y is on J1 X axis */
  199. #define JOY_HWS_YISJ2X 0x00000800l /* Y is on J2 X axis */
  200. #define JOY_HWS_YISJ2Y 0x00001000l /* Y is on J2 Y axis */
  201. /* Z defaults to J2 Y axis */
  202. #define JOY_HWS_ZISJ1X 0x00002000l /* Z is on J1 X axis */
  203. #define JOY_HWS_ZISJ1Y 0x00004000l /* Z is on J1 Y axis */
  204. #define JOY_HWS_ZISJ2X 0x00008000l /* Z is on J2 X axis */
  205. /* POV defaults to J2 Y axis, if it is not button based */
  206. #define JOY_HWS_POVISJ1X 0x00010000l /* pov done through J1 X axis */
  207. #define JOY_HWS_POVISJ1Y 0x00020000l /* pov done through J1 Y axis */
  208. #define JOY_HWS_POVISJ2X 0x00040000l /* pov done through J2 X axis */
  209. /* R defaults to J2 X axis */
  210. #define JOY_HWS_HASR 0x00080000l /* has R (4th axis) info */
  211. #define JOY_HWS_RISJ1X 0x00100000l /* R done through J1 X axis */
  212. #define JOY_HWS_RISJ1Y 0x00200000l /* R done through J1 Y axis */
  213. #define JOY_HWS_RISJ2Y 0x00400000l /* R done through J2 X axis */
  214. /* U & V for future hardware */
  215. #define JOY_HWS_HASU 0x00800000l /* has U (5th axis) info */
  216. #define JOY_HWS_HASV 0x01000000l /* has V (6th axis) info */
  217. /* Usage settings */
  218. #define JOY_US_HASRUDDER 0x00000001l /* joystick configured with rudder */
  219. #define JOY_US_PRESENT 0x00000002l /* is joystick actually present? */
  220. #define JOY_US_ISOEM 0x00000004l /* joystick is an OEM defined type */
  221. /* reserved for future use -> as link to next possible dword */
  222. #define JOY_US_RESERVED 0x80000000l /* reserved */
  223. /* Settings for TypeInfo Flags1 */
  224. #define JOYTYPE_ZEROGAMEENUMOEMDATA 0x00000001l /* Zero GameEnum's OEM data field */
  225. #define JOYTYPE_NOAUTODETECTGAMEPORT 0x00000002l /* Device does not support Autodetect gameport*/
  226. #define JOYTYPE_NOHIDDIRECT 0x00000004l /* Do not use HID directly for this device */
  227. #define JOYTYPE_ANALOGCOMPAT 0x00000008l /* Expose the analog compatible ID */
  228. #define JOYTYPE_DEFAULTPROPSHEET 0x80000000l /* CPL overrides custom property sheet */
  229. /* Settings for TypeInfo Flags2 */
  230. #define JOYTYPE_DEVICEHIDE 0x00010000l /* Hide unclassified devices */
  231. #define JOYTYPE_MOUSEHIDE 0x00020000l /* Hide mice */
  232. #define JOYTYPE_KEYBHIDE 0x00040000l /* Hide keyboards */
  233. #define JOYTYPE_GAMEHIDE 0x00080000l /* Hide game controllers */
  234. #define JOYTYPE_HIDEACTIVE 0x00100000l /* Hide flags are active */
  235. #define JOYTYPE_INFOMASK 0x00E00000l /* Mask for type specific info */
  236. #define JOYTYPE_INFODEFAULT 0x00000000l /* Use default axis mappings */
  237. #define JOYTYPE_INFOYYPEDALS 0x00200000l /* Use Y as a combined pedals axis */
  238. #define JOYTYPE_INFOZYPEDALS 0x00400000l /* Use Z for accelerate, Y for brake */
  239. #define JOYTYPE_INFOYRPEDALS 0x00600000l /* Use Y for accelerate, R for brake */
  240. #define JOYTYPE_INFOZRPEDALS 0x00800000l /* Use Z for accelerate, R for brake */
  241. #define JOYTYPE_INFOZISSLIDER 0x00200000l /* Use Z as a slider */
  242. #define JOYTYPE_INFOZISZ 0x00400000l /* Use Z as Z axis */
  243. #define JOYTYPE_ENABLEINPUTREPORT 0x01000000l /* Enable initial input reports */
  244. /* struct for storing x,y, z, and rudder values */
  245. typedef struct joypos_tag {
  246. DWORD dwX;
  247. DWORD dwY;
  248. DWORD dwZ;
  249. DWORD dwR;
  250. DWORD dwU;
  251. DWORD dwV;
  252. } JOYPOS, FAR *LPJOYPOS;
  253. /* struct for storing ranges */
  254. typedef struct joyrange_tag {
  255. JOYPOS jpMin;
  256. JOYPOS jpMax;
  257. JOYPOS jpCenter;
  258. } JOYRANGE,FAR *LPJOYRANGE;
  259. /*
  260. * dwTimeout - value at which to timeout joystick polling
  261. * jrvRanges - range of values app wants returned for axes
  262. * jpDeadZone - area around center to be considered
  263. * as "dead". specified as a percentage
  264. * (0-100). Only X & Y handled by system driver
  265. */
  266. typedef struct joyreguservalues_tag {
  267. DWORD dwTimeOut;
  268. JOYRANGE jrvRanges;
  269. JOYPOS jpDeadZone;
  270. } JOYREGUSERVALUES, FAR *LPJOYREGUSERVALUES;
  271. typedef struct joyreghwsettings_tag {
  272. DWORD dwFlags;
  273. DWORD dwNumButtons;
  274. } JOYREGHWSETTINGS, FAR *LPJOYHWSETTINGS;
  275. /* range of values returned by the hardware (filled in by calibration) */
  276. /*
  277. * jrvHardware - values returned by hardware
  278. * dwPOVValues - POV values returned by hardware
  279. * dwCalFlags - what has been calibrated
  280. */
  281. typedef struct joyreghwvalues_tag {
  282. JOYRANGE jrvHardware;
  283. DWORD dwPOVValues[JOY_POV_NUMDIRS];
  284. DWORD dwCalFlags;
  285. } JOYREGHWVALUES, FAR *LPJOYREGHWVALUES;
  286. /* hardware configuration */
  287. /*
  288. * hws - hardware settings
  289. * dwUsageSettings - usage settings
  290. * hwv - values returned by hardware
  291. * dwType - type of joystick
  292. * dwReserved - reserved for OEM drivers
  293. */
  294. typedef struct joyreghwconfig_tag {
  295. JOYREGHWSETTINGS hws;
  296. DWORD dwUsageSettings;
  297. JOYREGHWVALUES hwv;
  298. DWORD dwType;
  299. DWORD dwReserved;
  300. } JOYREGHWCONFIG, FAR *LPJOYREGHWCONFIG;
  301. /* joystick calibration info structure */
  302. typedef struct joycalibrate_tag {
  303. UINT wXbase;
  304. UINT wXdelta;
  305. UINT wYbase;
  306. UINT wYdelta;
  307. UINT wZbase;
  308. UINT wZdelta;
  309. } JOYCALIBRATE;
  310. typedef JOYCALIBRATE FAR *LPJOYCALIBRATE;
  311. #endif
  312. #ifndef DIJ_RINGZERO
  313. #define MAX_JOYSTRING 256
  314. typedef BOOL (FAR PASCAL * LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID);
  315. #ifndef MAX_JOYSTICKOEMVXDNAME
  316. #define MAX_JOYSTICKOEMVXDNAME 260
  317. #endif
  318. #define DITC_REGHWSETTINGS 0x00000001
  319. #define DITC_CLSIDCONFIG 0x00000002
  320. #define DITC_DISPLAYNAME 0x00000004
  321. #define DITC_CALLOUT 0x00000008
  322. #define DITC_HARDWAREID 0x00000010
  323. #define DITC_FLAGS1 0x00000020
  324. #define DITC_FLAGS2 0x00000040
  325. #define DITC_MAPFILE 0x00000080
  326. /* This structure is defined for DirectX 5.0 compatibility */
  327. typedef struct DIJOYTYPEINFO_DX5 {
  328. DWORD dwSize;
  329. JOYREGHWSETTINGS hws;
  330. CLSID clsidConfig;
  331. WCHAR wszDisplayName[MAX_JOYSTRING];
  332. WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
  333. } DIJOYTYPEINFO_DX5, *LPDIJOYTYPEINFO_DX5;
  334. typedef const DIJOYTYPEINFO_DX5 *LPCDIJOYTYPEINFO_DX5;
  335. /* This structure is defined for DirectX 6.1 compatibility */
  336. typedef struct DIJOYTYPEINFO_DX6 {
  337. DWORD dwSize;
  338. JOYREGHWSETTINGS hws;
  339. CLSID clsidConfig;
  340. WCHAR wszDisplayName[MAX_JOYSTRING];
  341. WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
  342. WCHAR wszHardwareId[MAX_JOYSTRING];
  343. DWORD dwFlags1;
  344. } DIJOYTYPEINFO_DX6, *LPDIJOYTYPEINFO_DX6;
  345. typedef const DIJOYTYPEINFO_DX6 *LPCDIJOYTYPEINFO_DX6;
  346. typedef struct DIJOYTYPEINFO {
  347. DWORD dwSize;
  348. JOYREGHWSETTINGS hws;
  349. CLSID clsidConfig;
  350. WCHAR wszDisplayName[MAX_JOYSTRING];
  351. WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
  352. #if(DIRECTINPUT_VERSION >= 0x05b2)
  353. WCHAR wszHardwareId[MAX_JOYSTRING];
  354. DWORD dwFlags1;
  355. #if(DIRECTINPUT_VERSION >= 0x0800)
  356. DWORD dwFlags2;
  357. WCHAR wszMapFile[MAX_JOYSTRING];
  358. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  359. #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
  360. } DIJOYTYPEINFO, *LPDIJOYTYPEINFO;
  361. typedef const DIJOYTYPEINFO *LPCDIJOYTYPEINFO;
  362. #define DIJC_GUIDINSTANCE 0x00000001
  363. #define DIJC_REGHWCONFIGTYPE 0x00000002
  364. #define DIJC_GAIN 0x00000004
  365. #define DIJC_CALLOUT 0x00000008
  366. #define DIJC_WDMGAMEPORT 0x00000010
  367. /* This structure is defined for DirectX 5.0 compatibility */
  368. typedef struct DIJOYCONFIG_DX5 {
  369. DWORD dwSize;
  370. GUID guidInstance;
  371. JOYREGHWCONFIG hwc;
  372. DWORD dwGain;
  373. WCHAR wszType[MAX_JOYSTRING];
  374. WCHAR wszCallout[MAX_JOYSTRING];
  375. } DIJOYCONFIG_DX5, *LPDIJOYCONFIG_DX5;
  376. typedef const DIJOYCONFIG_DX5 *LPCDIJOYCONFIG_DX5;
  377. typedef struct DIJOYCONFIG {
  378. DWORD dwSize;
  379. GUID guidInstance;
  380. JOYREGHWCONFIG hwc;
  381. DWORD dwGain;
  382. WCHAR wszType[MAX_JOYSTRING];
  383. WCHAR wszCallout[MAX_JOYSTRING];
  384. #if(DIRECTINPUT_VERSION >= 0x05b2)
  385. GUID guidGameport;
  386. #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
  387. } DIJOYCONFIG, *LPDIJOYCONFIG;
  388. typedef const DIJOYCONFIG *LPCDIJOYCONFIG;
  389. #define DIJU_USERVALUES 0x00000001
  390. #define DIJU_GLOBALDRIVER 0x00000002
  391. #define DIJU_GAMEPORTEMULATOR 0x00000004
  392. typedef struct DIJOYUSERVALUES {
  393. DWORD dwSize;
  394. JOYREGUSERVALUES ruv;
  395. WCHAR wszGlobalDriver[MAX_JOYSTRING];
  396. WCHAR wszGameportEmulator[MAX_JOYSTRING];
  397. } DIJOYUSERVALUES, *LPDIJOYUSERVALUES;
  398. typedef const DIJOYUSERVALUES *LPCDIJOYUSERVALUES;
  399. DEFINE_GUID(GUID_KeyboardClass, 0x4D36E96B,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
  400. DEFINE_GUID(GUID_MediaClass, 0x4D36E96C,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
  401. DEFINE_GUID(GUID_MouseClass, 0x4D36E96F,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
  402. DEFINE_GUID(GUID_HIDClass, 0x745A17A0,0x74D3,0x11D0,0xB6,0xFE,0x00,0xA0,0xC9,0x0F,0x57,0xDA);
  403. #undef INTERFACE
  404. #define INTERFACE IDirectInputJoyConfig
  405. DECLARE_INTERFACE_(IDirectInputJoyConfig, IUnknown)
  406. {
  407. /*** IUnknown methods ***/
  408. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  409. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  410. STDMETHOD_(ULONG,Release)(THIS) PURE;
  411. /*** IDirectInputJoyConfig methods ***/
  412. STDMETHOD(Acquire)(THIS) PURE;
  413. STDMETHOD(Unacquire)(THIS) PURE;
  414. STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  415. STDMETHOD(SendNotify)(THIS) PURE;
  416. STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
  417. STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
  418. STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD) PURE;
  419. STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
  420. STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
  421. STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
  422. STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
  423. STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
  424. STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
  425. STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
  426. STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
  427. STDMETHOD(OpenConfigKey)(THIS_ UINT,DWORD,PHKEY) PURE;
  428. };
  429. typedef struct IDirectInputJoyConfig *LPDIRECTINPUTJOYCONFIG;
  430. #if !defined(__cplusplus) || defined(CINTERFACE)
  431. #define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  432. #define IDirectInputJoyConfig_AddRef(p) (p)->lpVtbl->AddRef(p)
  433. #define IDirectInputJoyConfig_Release(p) (p)->lpVtbl->Release(p)
  434. #define IDirectInputJoyConfig_Acquire(p) (p)->lpVtbl->Acquire(p)
  435. #define IDirectInputJoyConfig_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  436. #define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  437. #define IDirectInputJoyConfig_SendNotify(p) (p)->lpVtbl->SendNotify(p)
  438. #define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
  439. #define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
  440. #define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->lpVtbl->SetTypeInfo(p,a,b,c)
  441. #define IDirectInputJoyConfig_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
  442. #define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
  443. #define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
  444. #define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
  445. #define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
  446. #define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
  447. #define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
  448. #define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
  449. #define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->lpVtbl->OpenConfigKey(p,a,b,c)
  450. #else
  451. #define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  452. #define IDirectInputJoyConfig_AddRef(p) (p)->AddRef()
  453. #define IDirectInputJoyConfig_Release(p) (p)->Release()
  454. #define IDirectInputJoyConfig_Acquire(p) (p)->Acquire()
  455. #define IDirectInputJoyConfig_Unacquire(p) (p)->Unacquire()
  456. #define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  457. #define IDirectInputJoyConfig_SendNotify(p) (p)->SendNotify()
  458. #define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
  459. #define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
  460. #define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->SetTypeInfo(a,b,c)
  461. #define IDirectInputJoyConfig_DeleteType(p,a) (p)->DeleteType(a)
  462. #define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
  463. #define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
  464. #define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->DeleteConfig(a)
  465. #define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
  466. #define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
  467. #define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
  468. #define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
  469. #define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->OpenConfigKey(a,b,c)
  470. #endif
  471. #endif /* DIJ_RINGZERO */
  472. #if(DIRECTINPUT_VERSION >= 0x0800)
  473. #ifndef DIJ_RINGZERO
  474. #undef INTERFACE
  475. #define INTERFACE IDirectInputJoyConfig8
  476. DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown)
  477. {
  478. /*** IUnknown methods ***/
  479. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  480. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  481. STDMETHOD_(ULONG,Release)(THIS) PURE;
  482. /*** IDirectInputJoyConfig8 methods ***/
  483. STDMETHOD(Acquire)(THIS) PURE;
  484. STDMETHOD(Unacquire)(THIS) PURE;
  485. STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  486. STDMETHOD(SendNotify)(THIS) PURE;
  487. STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
  488. STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
  489. STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD,LPWSTR) PURE;
  490. STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
  491. STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
  492. STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
  493. STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
  494. STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
  495. STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
  496. STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
  497. STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
  498. STDMETHOD(OpenAppStatusKey)(THIS_ PHKEY) PURE;
  499. };
  500. typedef struct IDirectInputJoyConfig8 *LPDIRECTINPUTJOYCONFIG8;
  501. #if !defined(__cplusplus) || defined(CINTERFACE)
  502. #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  503. #define IDirectInputJoyConfig8_AddRef(p) (p)->lpVtbl->AddRef(p)
  504. #define IDirectInputJoyConfig8_Release(p) (p)->lpVtbl->Release(p)
  505. #define IDirectInputJoyConfig8_Acquire(p) (p)->lpVtbl->Acquire(p)
  506. #define IDirectInputJoyConfig8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  507. #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  508. #define IDirectInputJoyConfig8_SendNotify(p) (p)->lpVtbl->SendNotify(p)
  509. #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
  510. #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
  511. #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->lpVtbl->SetTypeInfo(p,a,b,c,d)
  512. #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
  513. #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
  514. #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
  515. #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
  516. #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
  517. #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
  518. #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
  519. #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
  520. #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->lpVtbl->OpenAppStatusKey(p,a)
  521. #else
  522. #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  523. #define IDirectInputJoyConfig8_AddRef(p) (p)->AddRef()
  524. #define IDirectInputJoyConfig8_Release(p) (p)->Release()
  525. #define IDirectInputJoyConfig8_Acquire(p) (p)->Acquire()
  526. #define IDirectInputJoyConfig8_Unacquire(p) (p)->Unacquire()
  527. #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  528. #define IDirectInputJoyConfig8_SendNotify(p) (p)->SendNotify()
  529. #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
  530. #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
  531. #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->SetTypeInfo(a,b,c,d)
  532. #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->DeleteType(a)
  533. #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
  534. #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
  535. #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->DeleteConfig(a)
  536. #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
  537. #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
  538. #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
  539. #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
  540. #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->OpenAppStatusKey(a)
  541. #endif
  542. #endif /* DIJ_RINGZERO */
  543. /****************************************************************************
  544. *
  545. * Notification Messages
  546. *
  547. ****************************************************************************/
  548. /* RegisterWindowMessage with this to get DirectInput notification messages */
  549. #define DIRECTINPUT_NOTIFICATION_MSGSTRINGA "DIRECTINPUT_NOTIFICATION_MSGSTRING"
  550. #define DIRECTINPUT_NOTIFICATION_MSGSTRINGW L"DIRECTINPUT_NOTIFICATION_MSGSTRING"
  551. #ifdef UNICODE
  552. #define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGW
  553. #else
  554. #define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGA
  555. #endif
  556. #define DIMSGWP_NEWAPPSTART 0x00000001
  557. #define DIMSGWP_DX8APPSTART 0x00000002
  558. #define DIMSGWP_DX8MAPPERAPPSTART 0x00000003
  559. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  560. #define DIAPPIDFLAG_NOTIME 0x00000001
  561. #define DIAPPIDFLAG_NOSIZE 0x00000002
  562. #define DIRECTINPUT_REGSTR_VAL_APPIDFLAGA "AppIdFlag"
  563. #define DIRECTINPUT_REGSTR_KEY_LASTAPPA "MostRecentApplication"
  564. #define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA "MostRecentMapperApplication"
  565. #define DIRECTINPUT_REGSTR_VAL_VERSIONA "Version"
  566. #define DIRECTINPUT_REGSTR_VAL_NAMEA "Name"
  567. #define DIRECTINPUT_REGSTR_VAL_IDA "Id"
  568. #define DIRECTINPUT_REGSTR_VAL_MAPPERA "UsesMapper"
  569. #define DIRECTINPUT_REGSTR_VAL_LASTSTARTA "MostRecentStart"
  570. #define DIRECTINPUT_REGSTR_VAL_APPIDFLAGW L"AppIdFlag"
  571. #define DIRECTINPUT_REGSTR_KEY_LASTAPPW L"MostRecentApplication"
  572. #define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW L"MostRecentMapperApplication"
  573. #define DIRECTINPUT_REGSTR_VAL_VERSIONW L"Version"
  574. #define DIRECTINPUT_REGSTR_VAL_NAMEW L"Name"
  575. #define DIRECTINPUT_REGSTR_VAL_IDW L"Id"
  576. #define DIRECTINPUT_REGSTR_VAL_MAPPERW L"UsesMapper"
  577. #define DIRECTINPUT_REGSTR_VAL_LASTSTARTW L"MostRecentStart"
  578. #ifdef UNICODE
  579. #define DIRECTINPUT_REGSTR_VAL_APPIDFLAG DIRECTINPUT_REGSTR_VAL_APPIDFLAGW
  580. #define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPW
  581. #define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW
  582. #define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONW
  583. #define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEW
  584. #define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDW
  585. #define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERW
  586. #define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTW
  587. #else
  588. #define DIRECTINPUT_REGSTR_VAL_APPIDFLAG DIRECTINPUT_REGSTR_VAL_APPIDFLAGA
  589. #define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPA
  590. #define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA
  591. #define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONA
  592. #define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEA
  593. #define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDA
  594. #define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERA
  595. #define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTA
  596. #endif
  597. /****************************************************************************
  598. *
  599. * Return Codes
  600. *
  601. ****************************************************************************/
  602. #define DIERR_NOMOREITEMS \
  603. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS)
  604. /*
  605. * Device driver-specific codes.
  606. */
  607. #define DIERR_DRIVERFIRST 0x80040300L
  608. #define DIERR_DRIVERLAST 0x800403FFL
  609. /*
  610. * Unless the specific driver has been precisely identified, no meaning
  611. * should be attributed to these values other than that the driver
  612. * originated the error. However, to illustrate the types of error that
  613. * may be causing the failure, the PID force feedback driver distributed
  614. * with DirectX 7 could return the following errors:
  615. *
  616. * DIERR_DRIVERFIRST + 1
  617. * The requested usage was not found.
  618. * DIERR_DRIVERFIRST + 2
  619. * The parameter block couldn't be downloaded to the device.
  620. * DIERR_DRIVERFIRST + 3
  621. * PID initialization failed.
  622. * DIERR_DRIVERFIRST + 4
  623. * The provided values couldn't be scaled.
  624. */
  625. /*
  626. * Device installer errors.
  627. */
  628. /*
  629. * Registry entry or DLL for class installer invalid
  630. * or class installer not found.
  631. */
  632. #define DIERR_INVALIDCLASSINSTALLER 0x80040400L
  633. /*
  634. * The user cancelled the install operation.
  635. */
  636. #define DIERR_CANCELLED 0x80040401L
  637. /*
  638. * The INF file for the selected device could not be
  639. * found or is invalid or is damaged.
  640. */
  641. #define DIERR_BADINF 0x80040402L
  642. /****************************************************************************
  643. *
  644. * Map files
  645. *
  646. ****************************************************************************/
  647. /*
  648. * Delete particular data from default map file.
  649. */
  650. #define DIDIFT_DELETE 0x01000000
  651. #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
  652. #pragma endregion
  653. #ifdef __cplusplus
  654. };
  655. #endif
  656. #endif /* __DINPUTD_INCLUDED__ */