dinput.h 110 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468
  1. /*
  2. * Copyright (C) the Wine project
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  17. */
  18. #ifndef __DINPUT_INCLUDED__
  19. #define __DINPUT_INCLUDED__
  20. #define COM_NO_WINDOWS_H
  21. #include <objbase.h>
  22. #include <_mingw_dxhelper.h>
  23. #ifndef DIRECTINPUT_VERSION
  24. #define DIRECTINPUT_VERSION 0x0800
  25. #endif
  26. /* Classes */
  27. DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  28. DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  29. DEFINE_GUID(CLSID_DirectInput8, 0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  30. DEFINE_GUID(CLSID_DirectInputDevice8, 0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  31. /* Interfaces */
  32. DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  33. DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  34. DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  35. DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  36. DEFINE_GUID(IID_IDirectInput7A, 0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  37. DEFINE_GUID(IID_IDirectInput7W, 0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  38. DEFINE_GUID(IID_IDirectInput8A, 0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
  39. DEFINE_GUID(IID_IDirectInput8W, 0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
  40. DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  41. DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  42. DEFINE_GUID(IID_IDirectInputDevice2A, 0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  43. DEFINE_GUID(IID_IDirectInputDevice2W, 0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  44. DEFINE_GUID(IID_IDirectInputDevice7A, 0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  45. DEFINE_GUID(IID_IDirectInputDevice7W, 0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  46. DEFINE_GUID(IID_IDirectInputDevice8A, 0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
  47. DEFINE_GUID(IID_IDirectInputDevice8W, 0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
  48. DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  49. /* Predefined object types */
  50. DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  51. DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  52. DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  53. DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  54. DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  55. DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  56. DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  57. DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  58. DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  59. DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  60. DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  61. /* Predefined product GUIDs */
  62. DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  63. DEFINE_GUID(GUID_SysKeyboard, 0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  64. DEFINE_GUID(GUID_Joystick, 0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  65. DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  66. DEFINE_GUID(GUID_SysMouseEm2, 0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  67. DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  68. DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  69. /* predefined forcefeedback effects */
  70. DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  71. DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  72. DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  73. DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  74. DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  75. DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  76. DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  77. DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  78. DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  79. DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  80. DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  81. DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  82. typedef struct IDirectInputA *LPDIRECTINPUTA;
  83. typedef struct IDirectInputW *LPDIRECTINPUTW;
  84. typedef struct IDirectInput2A *LPDIRECTINPUT2A;
  85. typedef struct IDirectInput2W *LPDIRECTINPUT2W;
  86. typedef struct IDirectInput7A *LPDIRECTINPUT7A;
  87. typedef struct IDirectInput7W *LPDIRECTINPUT7W;
  88. #if DIRECTINPUT_VERSION >= 0x0800
  89. typedef struct IDirectInput8A *LPDIRECTINPUT8A;
  90. typedef struct IDirectInput8W *LPDIRECTINPUT8W;
  91. #endif /* DI8 */
  92. typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
  93. typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
  94. #if DIRECTINPUT_VERSION >= 0x0500
  95. typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
  96. typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
  97. #endif /* DI5 */
  98. #if DIRECTINPUT_VERSION >= 0x0700
  99. typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
  100. typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
  101. #endif /* DI7 */
  102. #if DIRECTINPUT_VERSION >= 0x0800
  103. typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
  104. typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
  105. #endif /* DI8 */
  106. #if DIRECTINPUT_VERSION >= 0x0500
  107. typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
  108. #endif /* DI5 */
  109. typedef struct SysKeyboardA *LPSYSKEYBOARDA;
  110. typedef struct SysMouseA *LPSYSMOUSEA;
  111. #define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
  112. #define IDirectInput WINELIB_NAME_AW(IDirectInput)
  113. DECL_WINELIB_TYPE_AW(LPDIRECTINPUT)
  114. #define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
  115. #define IDirectInput2 WINELIB_NAME_AW(IDirectInput2)
  116. DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2)
  117. #define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
  118. #define IDirectInput7 WINELIB_NAME_AW(IDirectInput7)
  119. DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7)
  120. #if DIRECTINPUT_VERSION >= 0x0800
  121. #define IID_IDirectInput8 WINELIB_NAME_AW(IID_IDirectInput8)
  122. #define IDirectInput8 WINELIB_NAME_AW(IDirectInput8)
  123. DECL_WINELIB_TYPE_AW(LPDIRECTINPUT8)
  124. #endif /* DI8 */
  125. #define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
  126. #define IDirectInputDevice WINELIB_NAME_AW(IDirectInputDevice)
  127. DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE)
  128. #if DIRECTINPUT_VERSION >= 0x0500
  129. #define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
  130. #define IDirectInputDevice2 WINELIB_NAME_AW(IDirectInputDevice2)
  131. DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2)
  132. #endif /* DI5 */
  133. #if DIRECTINPUT_VERSION >= 0x0700
  134. #define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
  135. #define IDirectInputDevice7 WINELIB_NAME_AW(IDirectInputDevice7)
  136. DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7)
  137. #endif /* DI7 */
  138. #if DIRECTINPUT_VERSION >= 0x0800
  139. #define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
  140. #define IDirectInputDevice8 WINELIB_NAME_AW(IDirectInputDevice8)
  141. DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8)
  142. #endif /* DI8 */
  143. #define DI_OK S_OK
  144. #define DI_NOTATTACHED S_FALSE
  145. #define DI_BUFFEROVERFLOW S_FALSE
  146. #define DI_PROPNOEFFECT S_FALSE
  147. #define DI_NOEFFECT S_FALSE
  148. #define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
  149. #define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
  150. #define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
  151. #define DI_TRUNCATED ((HRESULT)0x00000008L)
  152. #define DI_SETTINGSNOTSAVED ((HRESULT)0x0000000BL)
  153. #define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
  154. #define DI_WRITEPROTECT ((HRESULT)0x00000013L)
  155. #define DIERR_OLDDIRECTINPUTVERSION \
  156. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
  157. #define DIERR_BETADIRECTINPUTVERSION \
  158. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
  159. #define DIERR_BADDRIVERVER \
  160. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
  161. #define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
  162. #define DIERR_NOTFOUND \
  163. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
  164. #define DIERR_OBJECTNOTFOUND \
  165. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
  166. #define DIERR_INVALIDPARAM E_INVALIDARG
  167. #define DIERR_NOINTERFACE E_NOINTERFACE
  168. #define DIERR_GENERIC E_FAIL
  169. #define DIERR_OUTOFMEMORY E_OUTOFMEMORY
  170. #define DIERR_UNSUPPORTED E_NOTIMPL
  171. #define DIERR_NOTINITIALIZED \
  172. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
  173. #define DIERR_ALREADYINITIALIZED \
  174. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
  175. #define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
  176. #define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
  177. #define DIERR_INPUTLOST \
  178. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
  179. #define DIERR_ACQUIRED \
  180. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
  181. #define DIERR_NOTACQUIRED \
  182. MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
  183. #define DIERR_READONLY E_ACCESSDENIED
  184. #define DIERR_HANDLEEXISTS E_ACCESSDENIED
  185. #ifndef E_PENDING
  186. #define E_PENDING 0x8000000AL
  187. #endif
  188. #define DIERR_INSUFFICIENTPRIVS 0x80040200L
  189. #define DIERR_DEVICEFULL 0x80040201L
  190. #define DIERR_MOREDATA 0x80040202L
  191. #define DIERR_NOTDOWNLOADED 0x80040203L
  192. #define DIERR_HASEFFECTS 0x80040204L
  193. #define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
  194. #define DIERR_INCOMPLETEEFFECT 0x80040206L
  195. #define DIERR_NOTBUFFERED 0x80040207L
  196. #define DIERR_EFFECTPLAYING 0x80040208L
  197. #define DIERR_UNPLUGGED 0x80040209L
  198. #define DIERR_REPORTFULL 0x8004020AL
  199. #define DIERR_MAPFILEFAIL 0x8004020BL
  200. #define DIENUM_STOP 0
  201. #define DIENUM_CONTINUE 1
  202. #define DIEDFL_ALLDEVICES 0x00000000
  203. #define DIEDFL_ATTACHEDONLY 0x00000001
  204. #define DIEDFL_FORCEFEEDBACK 0x00000100
  205. #define DIEDFL_INCLUDEALIASES 0x00010000
  206. #define DIEDFL_INCLUDEPHANTOMS 0x00020000
  207. #define DIEDFL_INCLUDEHIDDEN 0x00040000
  208. #define DIDEVTYPE_DEVICE 1
  209. #define DIDEVTYPE_MOUSE 2
  210. #define DIDEVTYPE_KEYBOARD 3
  211. #define DIDEVTYPE_JOYSTICK 4
  212. #define DIDEVTYPE_HID 0x00010000
  213. #define DI8DEVCLASS_ALL 0
  214. #define DI8DEVCLASS_DEVICE 1
  215. #define DI8DEVCLASS_POINTER 2
  216. #define DI8DEVCLASS_KEYBOARD 3
  217. #define DI8DEVCLASS_GAMECTRL 4
  218. #define DI8DEVTYPE_DEVICE 0x11
  219. #define DI8DEVTYPE_MOUSE 0x12
  220. #define DI8DEVTYPE_KEYBOARD 0x13
  221. #define DI8DEVTYPE_JOYSTICK 0x14
  222. #define DI8DEVTYPE_GAMEPAD 0x15
  223. #define DI8DEVTYPE_DRIVING 0x16
  224. #define DI8DEVTYPE_FLIGHT 0x17
  225. #define DI8DEVTYPE_1STPERSON 0x18
  226. #define DI8DEVTYPE_DEVICECTRL 0x19
  227. #define DI8DEVTYPE_SCREENPOINTER 0x1A
  228. #define DI8DEVTYPE_REMOTE 0x1B
  229. #define DI8DEVTYPE_SUPPLEMENTAL 0x1C
  230. #define DIDEVTYPEMOUSE_UNKNOWN 1
  231. #define DIDEVTYPEMOUSE_TRADITIONAL 2
  232. #define DIDEVTYPEMOUSE_FINGERSTICK 3
  233. #define DIDEVTYPEMOUSE_TOUCHPAD 4
  234. #define DIDEVTYPEMOUSE_TRACKBALL 5
  235. #define DIDEVTYPEKEYBOARD_UNKNOWN 0
  236. #define DIDEVTYPEKEYBOARD_PCXT 1
  237. #define DIDEVTYPEKEYBOARD_OLIVETTI 2
  238. #define DIDEVTYPEKEYBOARD_PCAT 3
  239. #define DIDEVTYPEKEYBOARD_PCENH 4
  240. #define DIDEVTYPEKEYBOARD_NOKIA1050 5
  241. #define DIDEVTYPEKEYBOARD_NOKIA9140 6
  242. #define DIDEVTYPEKEYBOARD_NEC98 7
  243. #define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
  244. #define DIDEVTYPEKEYBOARD_NEC98106 9
  245. #define DIDEVTYPEKEYBOARD_JAPAN106 10
  246. #define DIDEVTYPEKEYBOARD_JAPANAX 11
  247. #define DIDEVTYPEKEYBOARD_J3100 12
  248. #define DIDEVTYPEJOYSTICK_UNKNOWN 1
  249. #define DIDEVTYPEJOYSTICK_TRADITIONAL 2
  250. #define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
  251. #define DIDEVTYPEJOYSTICK_GAMEPAD 4
  252. #define DIDEVTYPEJOYSTICK_RUDDER 5
  253. #define DIDEVTYPEJOYSTICK_WHEEL 6
  254. #define DIDEVTYPEJOYSTICK_HEADTRACKER 7
  255. #define DI8DEVTYPEMOUSE_UNKNOWN 1
  256. #define DI8DEVTYPEMOUSE_TRADITIONAL 2
  257. #define DI8DEVTYPEMOUSE_FINGERSTICK 3
  258. #define DI8DEVTYPEMOUSE_TOUCHPAD 4
  259. #define DI8DEVTYPEMOUSE_TRACKBALL 5
  260. #define DI8DEVTYPEMOUSE_ABSOLUTE 6
  261. #define DI8DEVTYPEKEYBOARD_UNKNOWN 0
  262. #define DI8DEVTYPEKEYBOARD_PCXT 1
  263. #define DI8DEVTYPEKEYBOARD_OLIVETTI 2
  264. #define DI8DEVTYPEKEYBOARD_PCAT 3
  265. #define DI8DEVTYPEKEYBOARD_PCENH 4
  266. #define DI8DEVTYPEKEYBOARD_NOKIA1050 5
  267. #define DI8DEVTYPEKEYBOARD_NOKIA9140 6
  268. #define DI8DEVTYPEKEYBOARD_NEC98 7
  269. #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8
  270. #define DI8DEVTYPEKEYBOARD_NEC98106 9
  271. #define DI8DEVTYPEKEYBOARD_JAPAN106 10
  272. #define DI8DEVTYPEKEYBOARD_JAPANAX 11
  273. #define DI8DEVTYPEKEYBOARD_J3100 12
  274. #define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
  275. #define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
  276. #define DI8DEVTYPEJOYSTICK_STANDARD 2
  277. #define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
  278. #define DI8DEVTYPEGAMEPAD_STANDARD 2
  279. #define DI8DEVTYPEGAMEPAD_TILT 3
  280. #define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
  281. #define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2
  282. #define DI8DEVTYPEDRIVING_DUALPEDALS 3
  283. #define DI8DEVTYPEDRIVING_THREEPEDALS 4
  284. #define DI8DEVTYPEDRIVING_HANDHELD 5
  285. #define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
  286. #define DI8DEVTYPEFLIGHT_STICK 2
  287. #define DI8DEVTYPEFLIGHT_YOKE 3
  288. #define DI8DEVTYPEFLIGHT_RC 4
  289. #define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
  290. #define DI8DEVTYPE1STPERSON_UNKNOWN 2
  291. #define DI8DEVTYPE1STPERSON_SIXDOF 3
  292. #define DI8DEVTYPE1STPERSON_SHOOTER 4
  293. #define DI8DEVTYPESCREENPTR_UNKNOWN 2
  294. #define DI8DEVTYPESCREENPTR_LIGHTGUN 3
  295. #define DI8DEVTYPESCREENPTR_LIGHTPEN 4
  296. #define DI8DEVTYPESCREENPTR_TOUCH 5
  297. #define DI8DEVTYPEREMOTE_UNKNOWN 2
  298. #define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
  299. #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
  300. #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
  301. #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2
  302. #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3
  303. #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4
  304. #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5
  305. #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6
  306. #define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7
  307. #define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8
  308. #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9
  309. #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10
  310. #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11
  311. #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12
  312. #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13
  313. #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
  314. #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
  315. typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
  316. DWORD dwSize;
  317. GUID guidType;
  318. DWORD dwOfs;
  319. DWORD dwType;
  320. DWORD dwFlags;
  321. CHAR tszName[MAX_PATH];
  322. } DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
  323. typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
  324. typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
  325. DWORD dwSize;
  326. GUID guidType;
  327. DWORD dwOfs;
  328. DWORD dwType;
  329. DWORD dwFlags;
  330. WCHAR tszName[MAX_PATH];
  331. } DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
  332. typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
  333. DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3)
  334. DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3)
  335. DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3)
  336. typedef struct DIDEVICEOBJECTINSTANCEA {
  337. DWORD dwSize;
  338. GUID guidType;
  339. DWORD dwOfs;
  340. DWORD dwType;
  341. DWORD dwFlags;
  342. CHAR tszName[MAX_PATH];
  343. #if(DIRECTINPUT_VERSION >= 0x0500)
  344. DWORD dwFFMaxForce;
  345. DWORD dwFFForceResolution;
  346. WORD wCollectionNumber;
  347. WORD wDesignatorIndex;
  348. WORD wUsagePage;
  349. WORD wUsage;
  350. DWORD dwDimension;
  351. WORD wExponent;
  352. WORD wReserved;
  353. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  354. } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
  355. typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
  356. typedef struct DIDEVICEOBJECTINSTANCEW {
  357. DWORD dwSize;
  358. GUID guidType;
  359. DWORD dwOfs;
  360. DWORD dwType;
  361. DWORD dwFlags;
  362. WCHAR tszName[MAX_PATH];
  363. #if(DIRECTINPUT_VERSION >= 0x0500)
  364. DWORD dwFFMaxForce;
  365. DWORD dwFFForceResolution;
  366. WORD wCollectionNumber;
  367. WORD wDesignatorIndex;
  368. WORD wUsagePage;
  369. WORD wUsage;
  370. DWORD dwDimension;
  371. WORD wExponent;
  372. WORD wReserved;
  373. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  374. } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
  375. typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
  376. DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)
  377. DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)
  378. DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)
  379. typedef struct DIDEVICEINSTANCE_DX3A {
  380. DWORD dwSize;
  381. GUID guidInstance;
  382. GUID guidProduct;
  383. DWORD dwDevType;
  384. CHAR tszInstanceName[MAX_PATH];
  385. CHAR tszProductName[MAX_PATH];
  386. } DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
  387. typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
  388. typedef struct DIDEVICEINSTANCE_DX3W {
  389. DWORD dwSize;
  390. GUID guidInstance;
  391. GUID guidProduct;
  392. DWORD dwDevType;
  393. WCHAR tszInstanceName[MAX_PATH];
  394. WCHAR tszProductName[MAX_PATH];
  395. } DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
  396. typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
  397. DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3)
  398. DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3)
  399. DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3)
  400. typedef struct DIDEVICEINSTANCEA {
  401. DWORD dwSize;
  402. GUID guidInstance;
  403. GUID guidProduct;
  404. DWORD dwDevType;
  405. CHAR tszInstanceName[MAX_PATH];
  406. CHAR tszProductName[MAX_PATH];
  407. #if(DIRECTINPUT_VERSION >= 0x0500)
  408. GUID guidFFDriver;
  409. WORD wUsagePage;
  410. WORD wUsage;
  411. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  412. } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
  413. typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
  414. typedef struct DIDEVICEINSTANCEW {
  415. DWORD dwSize;
  416. GUID guidInstance;
  417. GUID guidProduct;
  418. DWORD dwDevType;
  419. WCHAR tszInstanceName[MAX_PATH];
  420. WCHAR tszProductName[MAX_PATH];
  421. #if(DIRECTINPUT_VERSION >= 0x0500)
  422. GUID guidFFDriver;
  423. WORD wUsagePage;
  424. WORD wUsage;
  425. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  426. } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
  427. typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
  428. DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)
  429. DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)
  430. DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)
  431. typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);
  432. typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);
  433. DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)
  434. #define DIEDBS_MAPPEDPRI1 0x00000001
  435. #define DIEDBS_MAPPEDPRI2 0x00000002
  436. #define DIEDBS_RECENTDEVICE 0x00000010
  437. #define DIEDBS_NEWDEVICE 0x00000020
  438. #define DIEDBSFL_ATTACHEDONLY 0x00000000
  439. #define DIEDBSFL_THISUSER 0x00000010
  440. #define DIEDBSFL_FORCEFEEDBACK DIEDFL_FORCEFEEDBACK
  441. #define DIEDBSFL_AVAILABLEDEVICES 0x00001000
  442. #define DIEDBSFL_MULTIMICEKEYBOARDS 0x00002000
  443. #define DIEDBSFL_NONGAMINGDEVICES 0x00004000
  444. #define DIEDBSFL_VALID 0x00007110
  445. #if DIRECTINPUT_VERSION >= 0x0800
  446. typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);
  447. typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);
  448. DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)
  449. #endif
  450. typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);
  451. typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);
  452. typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);
  453. DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)
  454. #if DIRECTINPUT_VERSION >= 0x0500
  455. typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
  456. #endif
  457. #define DIK_ESCAPE 0x01
  458. #define DIK_1 0x02
  459. #define DIK_2 0x03
  460. #define DIK_3 0x04
  461. #define DIK_4 0x05
  462. #define DIK_5 0x06
  463. #define DIK_6 0x07
  464. #define DIK_7 0x08
  465. #define DIK_8 0x09
  466. #define DIK_9 0x0A
  467. #define DIK_0 0x0B
  468. #define DIK_MINUS 0x0C /* - on main keyboard */
  469. #define DIK_EQUALS 0x0D
  470. #define DIK_BACK 0x0E /* backspace */
  471. #define DIK_TAB 0x0F
  472. #define DIK_Q 0x10
  473. #define DIK_W 0x11
  474. #define DIK_E 0x12
  475. #define DIK_R 0x13
  476. #define DIK_T 0x14
  477. #define DIK_Y 0x15
  478. #define DIK_U 0x16
  479. #define DIK_I 0x17
  480. #define DIK_O 0x18
  481. #define DIK_P 0x19
  482. #define DIK_LBRACKET 0x1A
  483. #define DIK_RBRACKET 0x1B
  484. #define DIK_RETURN 0x1C /* Enter on main keyboard */
  485. #define DIK_LCONTROL 0x1D
  486. #define DIK_A 0x1E
  487. #define DIK_S 0x1F
  488. #define DIK_D 0x20
  489. #define DIK_F 0x21
  490. #define DIK_G 0x22
  491. #define DIK_H 0x23
  492. #define DIK_J 0x24
  493. #define DIK_K 0x25
  494. #define DIK_L 0x26
  495. #define DIK_SEMICOLON 0x27
  496. #define DIK_APOSTROPHE 0x28
  497. #define DIK_GRAVE 0x29 /* accent grave */
  498. #define DIK_LSHIFT 0x2A
  499. #define DIK_BACKSLASH 0x2B
  500. #define DIK_Z 0x2C
  501. #define DIK_X 0x2D
  502. #define DIK_C 0x2E
  503. #define DIK_V 0x2F
  504. #define DIK_B 0x30
  505. #define DIK_N 0x31
  506. #define DIK_M 0x32
  507. #define DIK_COMMA 0x33
  508. #define DIK_PERIOD 0x34 /* . on main keyboard */
  509. #define DIK_SLASH 0x35 /* / on main keyboard */
  510. #define DIK_RSHIFT 0x36
  511. #define DIK_MULTIPLY 0x37 /* * on numeric keypad */
  512. #define DIK_LMENU 0x38 /* left Alt */
  513. #define DIK_SPACE 0x39
  514. #define DIK_CAPITAL 0x3A
  515. #define DIK_F1 0x3B
  516. #define DIK_F2 0x3C
  517. #define DIK_F3 0x3D
  518. #define DIK_F4 0x3E
  519. #define DIK_F5 0x3F
  520. #define DIK_F6 0x40
  521. #define DIK_F7 0x41
  522. #define DIK_F8 0x42
  523. #define DIK_F9 0x43
  524. #define DIK_F10 0x44
  525. #define DIK_NUMLOCK 0x45
  526. #define DIK_SCROLL 0x46 /* Scroll Lock */
  527. #define DIK_NUMPAD7 0x47
  528. #define DIK_NUMPAD8 0x48
  529. #define DIK_NUMPAD9 0x49
  530. #define DIK_SUBTRACT 0x4A /* - on numeric keypad */
  531. #define DIK_NUMPAD4 0x4B
  532. #define DIK_NUMPAD5 0x4C
  533. #define DIK_NUMPAD6 0x4D
  534. #define DIK_ADD 0x4E /* + on numeric keypad */
  535. #define DIK_NUMPAD1 0x4F
  536. #define DIK_NUMPAD2 0x50
  537. #define DIK_NUMPAD3 0x51
  538. #define DIK_NUMPAD0 0x52
  539. #define DIK_DECIMAL 0x53 /* . on numeric keypad */
  540. #define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */
  541. #define DIK_F11 0x57
  542. #define DIK_F12 0x58
  543. #define DIK_F13 0x64 /* (NEC PC98) */
  544. #define DIK_F14 0x65 /* (NEC PC98) */
  545. #define DIK_F15 0x66 /* (NEC PC98) */
  546. #define DIK_KANA 0x70 /* (Japanese keyboard) */
  547. #define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */
  548. #define DIK_CONVERT 0x79 /* (Japanese keyboard) */
  549. #define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
  550. #define DIK_YEN 0x7D /* (Japanese keyboard) */
  551. #define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */
  552. #define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
  553. #define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
  554. #define DIK_AT 0x91 /* (NEC PC98) */
  555. #define DIK_COLON 0x92 /* (NEC PC98) */
  556. #define DIK_UNDERLINE 0x93 /* (NEC PC98) */
  557. #define DIK_KANJI 0x94 /* (Japanese keyboard) */
  558. #define DIK_STOP 0x95 /* (NEC PC98) */
  559. #define DIK_AX 0x96 /* (Japan AX) */
  560. #define DIK_UNLABELED 0x97 /* (J3100) */
  561. #define DIK_NEXTTRACK 0x99 /* Next Track */
  562. #define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
  563. #define DIK_RCONTROL 0x9D
  564. #define DIK_MUTE 0xA0 /* Mute */
  565. #define DIK_CALCULATOR 0xA1 /* Calculator */
  566. #define DIK_PLAYPAUSE 0xA2 /* Play / Pause */
  567. #define DIK_MEDIASTOP 0xA4 /* Media Stop */
  568. #define DIK_VOLUMEDOWN 0xAE /* Volume - */
  569. #define DIK_VOLUMEUP 0xB0 /* Volume + */
  570. #define DIK_WEBHOME 0xB2 /* Web home */
  571. #define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
  572. #define DIK_DIVIDE 0xB5 /* / on numeric keypad */
  573. #define DIK_SYSRQ 0xB7
  574. #define DIK_RMENU 0xB8 /* right Alt */
  575. #define DIK_PAUSE 0xC5 /* Pause */
  576. #define DIK_HOME 0xC7 /* Home on arrow keypad */
  577. #define DIK_UP 0xC8 /* UpArrow on arrow keypad */
  578. #define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
  579. #define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
  580. #define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
  581. #define DIK_END 0xCF /* End on arrow keypad */
  582. #define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
  583. #define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
  584. #define DIK_INSERT 0xD2 /* Insert on arrow keypad */
  585. #define DIK_DELETE 0xD3 /* Delete on arrow keypad */
  586. #define DIK_LWIN 0xDB /* Left Windows key */
  587. #define DIK_RWIN 0xDC /* Right Windows key */
  588. #define DIK_APPS 0xDD /* AppMenu key */
  589. #define DIK_POWER 0xDE
  590. #define DIK_SLEEP 0xDF
  591. #define DIK_WAKE 0xE3 /* System Wake */
  592. #define DIK_WEBSEARCH 0xE5 /* Web Search */
  593. #define DIK_WEBFAVORITES 0xE6 /* Web Favorites */
  594. #define DIK_WEBREFRESH 0xE7 /* Web Refresh */
  595. #define DIK_WEBSTOP 0xE8 /* Web Stop */
  596. #define DIK_WEBFORWARD 0xE9 /* Web Forward */
  597. #define DIK_WEBBACK 0xEA /* Web Back */
  598. #define DIK_MYCOMPUTER 0xEB /* My Computer */
  599. #define DIK_MAIL 0xEC /* Mail */
  600. #define DIK_MEDIASELECT 0xED /* Media Select */
  601. #define DIK_BACKSPACE DIK_BACK /* backspace */
  602. #define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
  603. #define DIK_LALT DIK_LMENU /* left Alt */
  604. #define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
  605. #define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
  606. #define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
  607. #define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
  608. #define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
  609. #define DIK_RALT DIK_RMENU /* right Alt */
  610. #define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
  611. #define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
  612. #define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
  613. #define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
  614. #define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
  615. #define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
  616. #define DIDFT_ALL 0x00000000
  617. #define DIDFT_RELAXIS 0x00000001
  618. #define DIDFT_ABSAXIS 0x00000002
  619. #define DIDFT_AXIS 0x00000003
  620. #define DIDFT_PSHBUTTON 0x00000004
  621. #define DIDFT_TGLBUTTON 0x00000008
  622. #define DIDFT_BUTTON 0x0000000C
  623. #define DIDFT_POV 0x00000010
  624. #define DIDFT_COLLECTION 0x00000040
  625. #define DIDFT_NODATA 0x00000080
  626. #define DIDFT_ANYINSTANCE 0x00FFFF00
  627. #define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
  628. #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
  629. #define DIDFT_GETTYPE(n) LOBYTE(n)
  630. #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
  631. #define DIDFT_FFACTUATOR 0x01000000
  632. #define DIDFT_FFEFFECTTRIGGER 0x02000000
  633. #if DIRECTINPUT_VERSION >= 0x050a
  634. #define DIDFT_OUTPUT 0x10000000
  635. #define DIDFT_VENDORDEFINED 0x04000000
  636. #define DIDFT_ALIAS 0x08000000
  637. #endif /* DI5a */
  638. #ifndef DIDFT_OPTIONAL
  639. #define DIDFT_OPTIONAL 0x80000000
  640. #endif
  641. #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
  642. #define DIDFT_NOCOLLECTION 0x00FFFF00
  643. #define DIDF_ABSAXIS 0x00000001
  644. #define DIDF_RELAXIS 0x00000002
  645. #define DIGDD_PEEK 0x00000001
  646. #define DISEQUENCE_COMPARE(dwSq1,cmp,dwSq2) ((int)((dwSq1) - (dwSq2)) cmp 0)
  647. typedef struct DIDEVICEOBJECTDATA_DX3 {
  648. DWORD dwOfs;
  649. DWORD dwData;
  650. DWORD dwTimeStamp;
  651. DWORD dwSequence;
  652. } DIDEVICEOBJECTDATA_DX3,*LPDIDEVICEOBJECTDATA_DX3;
  653. typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX3;
  654. typedef struct DIDEVICEOBJECTDATA {
  655. DWORD dwOfs;
  656. DWORD dwData;
  657. DWORD dwTimeStamp;
  658. DWORD dwSequence;
  659. #if(DIRECTINPUT_VERSION >= 0x0800)
  660. UINT_PTR uAppData;
  661. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  662. } DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
  663. typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
  664. typedef struct _DIOBJECTDATAFORMAT {
  665. const GUID *pguid;
  666. DWORD dwOfs;
  667. DWORD dwType;
  668. DWORD dwFlags;
  669. } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
  670. typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
  671. typedef struct _DIDATAFORMAT {
  672. DWORD dwSize;
  673. DWORD dwObjSize;
  674. DWORD dwFlags;
  675. DWORD dwDataSize;
  676. DWORD dwNumObjs;
  677. LPDIOBJECTDATAFORMAT rgodf;
  678. } DIDATAFORMAT, *LPDIDATAFORMAT;
  679. typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
  680. #if DIRECTINPUT_VERSION >= 0x0500
  681. #define DIDOI_FFACTUATOR 0x00000001
  682. #define DIDOI_FFEFFECTTRIGGER 0x00000002
  683. #define DIDOI_POLLED 0x00008000
  684. #define DIDOI_ASPECTPOSITION 0x00000100
  685. #define DIDOI_ASPECTVELOCITY 0x00000200
  686. #define DIDOI_ASPECTACCEL 0x00000300
  687. #define DIDOI_ASPECTFORCE 0x00000400
  688. #define DIDOI_ASPECTMASK 0x00000F00
  689. #endif /* DI5 */
  690. #if DIRECTINPUT_VERSION >= 0x050a
  691. #define DIDOI_GUIDISUSAGE 0x00010000
  692. #endif /* DI5a */
  693. typedef struct DIPROPHEADER {
  694. DWORD dwSize;
  695. DWORD dwHeaderSize;
  696. DWORD dwObj;
  697. DWORD dwHow;
  698. } DIPROPHEADER,*LPDIPROPHEADER;
  699. typedef const DIPROPHEADER *LPCDIPROPHEADER;
  700. #define DIPH_DEVICE 0
  701. #define DIPH_BYOFFSET 1
  702. #define DIPH_BYID 2
  703. #if DIRECTINPUT_VERSION >= 0x050a
  704. #define DIPH_BYUSAGE 3
  705. #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
  706. #endif /* DI5a */
  707. typedef struct DIPROPDWORD {
  708. DIPROPHEADER diph;
  709. DWORD dwData;
  710. } DIPROPDWORD, *LPDIPROPDWORD;
  711. typedef const DIPROPDWORD *LPCDIPROPDWORD;
  712. typedef struct DIPROPRANGE {
  713. DIPROPHEADER diph;
  714. LONG lMin;
  715. LONG lMax;
  716. } DIPROPRANGE, *LPDIPROPRANGE;
  717. typedef const DIPROPRANGE *LPCDIPROPRANGE;
  718. #define DIPROPRANGE_NOMIN ((LONG)0x80000000)
  719. #define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
  720. #if DIRECTINPUT_VERSION >= 0x050a
  721. typedef struct DIPROPCAL {
  722. DIPROPHEADER diph;
  723. LONG lMin;
  724. LONG lCenter;
  725. LONG lMax;
  726. } DIPROPCAL, *LPDIPROPCAL;
  727. typedef const DIPROPCAL *LPCDIPROPCAL;
  728. typedef struct DIPROPCALPOV {
  729. DIPROPHEADER diph;
  730. LONG lMin[5];
  731. LONG lMax[5];
  732. } DIPROPCALPOV, *LPDIPROPCALPOV;
  733. typedef const DIPROPCALPOV *LPCDIPROPCALPOV;
  734. typedef struct DIPROPGUIDANDPATH {
  735. DIPROPHEADER diph;
  736. GUID guidClass;
  737. WCHAR wszPath[MAX_PATH];
  738. } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
  739. typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
  740. typedef struct DIPROPSTRING {
  741. DIPROPHEADER diph;
  742. WCHAR wsz[MAX_PATH];
  743. } DIPROPSTRING, *LPDIPROPSTRING;
  744. typedef const DIPROPSTRING *LPCDIPROPSTRING;
  745. #endif /* DI5a */
  746. #if DIRECTINPUT_VERSION >= 0x0800
  747. typedef struct DIPROPPOINTER {
  748. DIPROPHEADER diph;
  749. UINT_PTR uData;
  750. } DIPROPPOINTER, *LPDIPROPPOINTER;
  751. typedef const DIPROPPOINTER *LPCDIPROPPOINTER;
  752. #endif /* DI8 */
  753. /* special property GUIDs */
  754. #ifdef __cplusplus
  755. #define MAKEDIPROP(prop) (*(const GUID *)(prop))
  756. #else
  757. #define MAKEDIPROP(prop) ((REFGUID)(prop))
  758. #endif
  759. #define DIPROP_BUFFERSIZE MAKEDIPROP(1)
  760. #define DIPROP_AXISMODE MAKEDIPROP(2)
  761. #define DIPROPAXISMODE_ABS 0
  762. #define DIPROPAXISMODE_REL 1
  763. #define DIPROP_GRANULARITY MAKEDIPROP(3)
  764. #define DIPROP_RANGE MAKEDIPROP(4)
  765. #define DIPROP_DEADZONE MAKEDIPROP(5)
  766. #define DIPROP_SATURATION MAKEDIPROP(6)
  767. #define DIPROP_FFGAIN MAKEDIPROP(7)
  768. #define DIPROP_FFLOAD MAKEDIPROP(8)
  769. #define DIPROP_AUTOCENTER MAKEDIPROP(9)
  770. #define DIPROPAUTOCENTER_OFF 0
  771. #define DIPROPAUTOCENTER_ON 1
  772. #define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
  773. #define DIPROPCALIBRATIONMODE_COOKED 0
  774. #define DIPROPCALIBRATIONMODE_RAW 1
  775. #if DIRECTINPUT_VERSION >= 0x050a
  776. #define DIPROP_CALIBRATION MAKEDIPROP(11)
  777. #define DIPROP_GUIDANDPATH MAKEDIPROP(12)
  778. #define DIPROP_INSTANCENAME MAKEDIPROP(13)
  779. #define DIPROP_PRODUCTNAME MAKEDIPROP(14)
  780. #endif
  781. #if DIRECTINPUT_VERSION >= 0x5B2
  782. #define DIPROP_JOYSTICKID MAKEDIPROP(15)
  783. #define DIPROP_GETPORTDISPLAYNAME MAKEDIPROP(16)
  784. #endif
  785. #if DIRECTINPUT_VERSION >= 0x0700
  786. #define DIPROP_PHYSICALRANGE MAKEDIPROP(18)
  787. #define DIPROP_LOGICALRANGE MAKEDIPROP(19)
  788. #endif
  789. #if(DIRECTINPUT_VERSION >= 0x0800)
  790. #define DIPROP_KEYNAME MAKEDIPROP(20)
  791. #define DIPROP_CPOINTS MAKEDIPROP(21)
  792. #define DIPROP_APPDATA MAKEDIPROP(22)
  793. #define DIPROP_SCANCODE MAKEDIPROP(23)
  794. #define DIPROP_VIDPID MAKEDIPROP(24)
  795. #define DIPROP_USERNAME MAKEDIPROP(25)
  796. #define DIPROP_TYPENAME MAKEDIPROP(26)
  797. #define MAXCPOINTSNUM 8
  798. typedef struct _CPOINT {
  799. LONG lP;
  800. DWORD dwLog;
  801. } CPOINT, *PCPOINT;
  802. typedef struct DIPROPCPOINTS {
  803. DIPROPHEADER diph;
  804. DWORD dwCPointsNum;
  805. CPOINT cp[MAXCPOINTSNUM];
  806. } DIPROPCPOINTS, *LPDIPROPCPOINTS;
  807. typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;
  808. #endif /* DI8 */
  809. typedef struct DIDEVCAPS_DX3 {
  810. DWORD dwSize;
  811. DWORD dwFlags;
  812. DWORD dwDevType;
  813. DWORD dwAxes;
  814. DWORD dwButtons;
  815. DWORD dwPOVs;
  816. } DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
  817. typedef struct DIDEVCAPS {
  818. DWORD dwSize;
  819. DWORD dwFlags;
  820. DWORD dwDevType;
  821. DWORD dwAxes;
  822. DWORD dwButtons;
  823. DWORD dwPOVs;
  824. #if(DIRECTINPUT_VERSION >= 0x0500)
  825. DWORD dwFFSamplePeriod;
  826. DWORD dwFFMinTimeResolution;
  827. DWORD dwFirmwareRevision;
  828. DWORD dwHardwareRevision;
  829. DWORD dwFFDriverVersion;
  830. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  831. } DIDEVCAPS,*LPDIDEVCAPS;
  832. #define DIDC_ATTACHED 0x00000001
  833. #define DIDC_POLLEDDEVICE 0x00000002
  834. #define DIDC_EMULATED 0x00000004
  835. #define DIDC_POLLEDDATAFORMAT 0x00000008
  836. #define DIDC_FORCEFEEDBACK 0x00000100
  837. #define DIDC_FFATTACK 0x00000200
  838. #define DIDC_FFFADE 0x00000400
  839. #define DIDC_SATURATION 0x00000800
  840. #define DIDC_POSNEGCOEFFICIENTS 0x00001000
  841. #define DIDC_POSNEGSATURATION 0x00002000
  842. #define DIDC_DEADBAND 0x00004000
  843. #define DIDC_STARTDELAY 0x00008000
  844. #define DIDC_ALIAS 0x00010000
  845. #define DIDC_PHANTOM 0x00020000
  846. #define DIDC_HIDDEN 0x00040000
  847. /* SetCooperativeLevel dwFlags */
  848. #define DISCL_EXCLUSIVE 0x00000001
  849. #define DISCL_NONEXCLUSIVE 0x00000002
  850. #define DISCL_FOREGROUND 0x00000004
  851. #define DISCL_BACKGROUND 0x00000008
  852. #define DISCL_NOWINKEY 0x00000010
  853. #if (DIRECTINPUT_VERSION >= 0x0500)
  854. /* Device FF flags */
  855. #define DISFFC_RESET 0x00000001
  856. #define DISFFC_STOPALL 0x00000002
  857. #define DISFFC_PAUSE 0x00000004
  858. #define DISFFC_CONTINUE 0x00000008
  859. #define DISFFC_SETACTUATORSON 0x00000010
  860. #define DISFFC_SETACTUATORSOFF 0x00000020
  861. #define DIGFFS_EMPTY 0x00000001
  862. #define DIGFFS_STOPPED 0x00000002
  863. #define DIGFFS_PAUSED 0x00000004
  864. #define DIGFFS_ACTUATORSON 0x00000010
  865. #define DIGFFS_ACTUATORSOFF 0x00000020
  866. #define DIGFFS_POWERON 0x00000040
  867. #define DIGFFS_POWEROFF 0x00000080
  868. #define DIGFFS_SAFETYSWITCHON 0x00000100
  869. #define DIGFFS_SAFETYSWITCHOFF 0x00000200
  870. #define DIGFFS_USERFFSWITCHON 0x00000400
  871. #define DIGFFS_USERFFSWITCHOFF 0x00000800
  872. #define DIGFFS_DEVICELOST 0x80000000
  873. /* Effect flags */
  874. #define DIEFT_ALL 0x00000000
  875. #define DIEFT_CONSTANTFORCE 0x00000001
  876. #define DIEFT_RAMPFORCE 0x00000002
  877. #define DIEFT_PERIODIC 0x00000003
  878. #define DIEFT_CONDITION 0x00000004
  879. #define DIEFT_CUSTOMFORCE 0x00000005
  880. #define DIEFT_HARDWARE 0x000000FF
  881. #define DIEFT_FFATTACK 0x00000200
  882. #define DIEFT_FFFADE 0x00000400
  883. #define DIEFT_SATURATION 0x00000800
  884. #define DIEFT_POSNEGCOEFFICIENTS 0x00001000
  885. #define DIEFT_POSNEGSATURATION 0x00002000
  886. #define DIEFT_DEADBAND 0x00004000
  887. #define DIEFT_STARTDELAY 0x00008000
  888. #define DIEFT_GETTYPE(n) LOBYTE(n)
  889. #define DIEFF_OBJECTIDS 0x00000001
  890. #define DIEFF_OBJECTOFFSETS 0x00000002
  891. #define DIEFF_CARTESIAN 0x00000010
  892. #define DIEFF_POLAR 0x00000020
  893. #define DIEFF_SPHERICAL 0x00000040
  894. #define DIEP_DURATION 0x00000001
  895. #define DIEP_SAMPLEPERIOD 0x00000002
  896. #define DIEP_GAIN 0x00000004
  897. #define DIEP_TRIGGERBUTTON 0x00000008
  898. #define DIEP_TRIGGERREPEATINTERVAL 0x00000010
  899. #define DIEP_AXES 0x00000020
  900. #define DIEP_DIRECTION 0x00000040
  901. #define DIEP_ENVELOPE 0x00000080
  902. #define DIEP_TYPESPECIFICPARAMS 0x00000100
  903. #if(DIRECTINPUT_VERSION >= 0x0600)
  904. #define DIEP_STARTDELAY 0x00000200
  905. #define DIEP_ALLPARAMS_DX5 0x000001FF
  906. #define DIEP_ALLPARAMS 0x000003FF
  907. #else
  908. #define DIEP_ALLPARAMS 0x000001FF
  909. #endif /* DIRECTINPUT_VERSION >= 0x0600 */
  910. #define DIEP_START 0x20000000
  911. #define DIEP_NORESTART 0x40000000
  912. #define DIEP_NODOWNLOAD 0x80000000
  913. #define DIEB_NOTRIGGER 0xFFFFFFFF
  914. #define DIES_SOLO 0x00000001
  915. #define DIES_NODOWNLOAD 0x80000000
  916. #define DIEGES_PLAYING 0x00000001
  917. #define DIEGES_EMULATED 0x00000002
  918. #define DI_DEGREES 100
  919. #define DI_FFNOMINALMAX 10000
  920. #define DI_SECONDS 1000000
  921. typedef struct DICONSTANTFORCE {
  922. LONG lMagnitude;
  923. } DICONSTANTFORCE, *LPDICONSTANTFORCE;
  924. typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
  925. typedef struct DIRAMPFORCE {
  926. LONG lStart;
  927. LONG lEnd;
  928. } DIRAMPFORCE, *LPDIRAMPFORCE;
  929. typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
  930. typedef struct DIPERIODIC {
  931. DWORD dwMagnitude;
  932. LONG lOffset;
  933. DWORD dwPhase;
  934. DWORD dwPeriod;
  935. } DIPERIODIC, *LPDIPERIODIC;
  936. typedef const DIPERIODIC *LPCDIPERIODIC;
  937. typedef struct DICONDITION {
  938. LONG lOffset;
  939. LONG lPositiveCoefficient;
  940. LONG lNegativeCoefficient;
  941. DWORD dwPositiveSaturation;
  942. DWORD dwNegativeSaturation;
  943. LONG lDeadBand;
  944. } DICONDITION, *LPDICONDITION;
  945. typedef const DICONDITION *LPCDICONDITION;
  946. typedef struct DICUSTOMFORCE {
  947. DWORD cChannels;
  948. DWORD dwSamplePeriod;
  949. DWORD cSamples;
  950. LPLONG rglForceData;
  951. } DICUSTOMFORCE, *LPDICUSTOMFORCE;
  952. typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
  953. typedef struct DIENVELOPE {
  954. DWORD dwSize;
  955. DWORD dwAttackLevel;
  956. DWORD dwAttackTime;
  957. DWORD dwFadeLevel;
  958. DWORD dwFadeTime;
  959. } DIENVELOPE, *LPDIENVELOPE;
  960. typedef const DIENVELOPE *LPCDIENVELOPE;
  961. typedef struct DIEFFECT_DX5 {
  962. DWORD dwSize;
  963. DWORD dwFlags;
  964. DWORD dwDuration;
  965. DWORD dwSamplePeriod;
  966. DWORD dwGain;
  967. DWORD dwTriggerButton;
  968. DWORD dwTriggerRepeatInterval;
  969. DWORD cAxes;
  970. LPDWORD rgdwAxes;
  971. LPLONG rglDirection;
  972. LPDIENVELOPE lpEnvelope;
  973. DWORD cbTypeSpecificParams;
  974. LPVOID lpvTypeSpecificParams;
  975. } DIEFFECT_DX5, *LPDIEFFECT_DX5;
  976. typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
  977. typedef struct DIEFFECT {
  978. DWORD dwSize;
  979. DWORD dwFlags;
  980. DWORD dwDuration;
  981. DWORD dwSamplePeriod;
  982. DWORD dwGain;
  983. DWORD dwTriggerButton;
  984. DWORD dwTriggerRepeatInterval;
  985. DWORD cAxes;
  986. LPDWORD rgdwAxes;
  987. LPLONG rglDirection;
  988. LPDIENVELOPE lpEnvelope;
  989. DWORD cbTypeSpecificParams;
  990. LPVOID lpvTypeSpecificParams;
  991. #if(DIRECTINPUT_VERSION >= 0x0600)
  992. DWORD dwStartDelay;
  993. #endif /* DIRECTINPUT_VERSION >= 0x0600 */
  994. } DIEFFECT, *LPDIEFFECT;
  995. typedef const DIEFFECT *LPCDIEFFECT;
  996. typedef DIEFFECT DIEFFECT_DX6;
  997. typedef LPDIEFFECT LPDIEFFECT_DX6;
  998. typedef struct DIEFFECTINFOA {
  999. DWORD dwSize;
  1000. GUID guid;
  1001. DWORD dwEffType;
  1002. DWORD dwStaticParams;
  1003. DWORD dwDynamicParams;
  1004. CHAR tszName[MAX_PATH];
  1005. } DIEFFECTINFOA, *LPDIEFFECTINFOA;
  1006. typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
  1007. typedef struct DIEFFECTINFOW {
  1008. DWORD dwSize;
  1009. GUID guid;
  1010. DWORD dwEffType;
  1011. DWORD dwStaticParams;
  1012. DWORD dwDynamicParams;
  1013. WCHAR tszName[MAX_PATH];
  1014. } DIEFFECTINFOW, *LPDIEFFECTINFOW;
  1015. typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
  1016. DECL_WINELIB_TYPE_AW(DIEFFECTINFO)
  1017. DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)
  1018. DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)
  1019. typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
  1020. typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
  1021. typedef struct DIEFFESCAPE {
  1022. DWORD dwSize;
  1023. DWORD dwCommand;
  1024. LPVOID lpvInBuffer;
  1025. DWORD cbInBuffer;
  1026. LPVOID lpvOutBuffer;
  1027. DWORD cbOutBuffer;
  1028. } DIEFFESCAPE, *LPDIEFFESCAPE;
  1029. typedef struct DIJOYSTATE {
  1030. LONG lX;
  1031. LONG lY;
  1032. LONG lZ;
  1033. LONG lRx;
  1034. LONG lRy;
  1035. LONG lRz;
  1036. LONG rglSlider[2];
  1037. DWORD rgdwPOV[4];
  1038. BYTE rgbButtons[32];
  1039. } DIJOYSTATE, *LPDIJOYSTATE;
  1040. typedef struct DIJOYSTATE2 {
  1041. LONG lX;
  1042. LONG lY;
  1043. LONG lZ;
  1044. LONG lRx;
  1045. LONG lRy;
  1046. LONG lRz;
  1047. LONG rglSlider[2];
  1048. DWORD rgdwPOV[4];
  1049. BYTE rgbButtons[128];
  1050. LONG lVX; /* 'v' as in velocity */
  1051. LONG lVY;
  1052. LONG lVZ;
  1053. LONG lVRx;
  1054. LONG lVRy;
  1055. LONG lVRz;
  1056. LONG rglVSlider[2];
  1057. LONG lAX; /* 'a' as in acceleration */
  1058. LONG lAY;
  1059. LONG lAZ;
  1060. LONG lARx;
  1061. LONG lARy;
  1062. LONG lARz;
  1063. LONG rglASlider[2];
  1064. LONG lFX; /* 'f' as in force */
  1065. LONG lFY;
  1066. LONG lFZ;
  1067. LONG lFRx; /* 'fr' as in rotational force aka torque */
  1068. LONG lFRy;
  1069. LONG lFRz;
  1070. LONG rglFSlider[2];
  1071. } DIJOYSTATE2, *LPDIJOYSTATE2;
  1072. #define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
  1073. #define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
  1074. #define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
  1075. #define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
  1076. #define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
  1077. #define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
  1078. #define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
  1079. (n) * sizeof(LONG))
  1080. #define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
  1081. (n) * sizeof(DWORD))
  1082. #define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
  1083. #define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
  1084. #define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
  1085. #define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
  1086. #define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
  1087. #define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
  1088. #define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
  1089. #define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
  1090. #define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
  1091. #define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
  1092. #define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
  1093. #define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
  1094. #define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
  1095. #define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
  1096. #define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
  1097. #define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
  1098. #define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
  1099. #define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
  1100. #define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
  1101. #define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
  1102. #define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
  1103. #define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
  1104. #define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
  1105. #define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
  1106. #define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
  1107. #define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
  1108. #define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
  1109. #define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
  1110. #define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
  1111. #define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
  1112. #define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
  1113. #define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
  1114. #define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
  1115. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1116. /* DInput 7 structures, types */
  1117. #if(DIRECTINPUT_VERSION >= 0x0700)
  1118. typedef struct DIFILEEFFECT {
  1119. DWORD dwSize;
  1120. GUID GuidEffect;
  1121. LPCDIEFFECT lpDiEffect;
  1122. CHAR szFriendlyName[MAX_PATH];
  1123. } DIFILEEFFECT, *LPDIFILEEFFECT;
  1124. typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
  1125. typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
  1126. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  1127. /* DInput 8 structures and types */
  1128. #if DIRECTINPUT_VERSION >= 0x0800
  1129. typedef struct _DIACTIONA {
  1130. UINT_PTR uAppData;
  1131. DWORD dwSemantic;
  1132. DWORD dwFlags;
  1133. __GNU_EXTENSION union {
  1134. LPCSTR lptszActionName;
  1135. UINT uResIdString;
  1136. } DUMMYUNIONNAME;
  1137. GUID guidInstance;
  1138. DWORD dwObjID;
  1139. DWORD dwHow;
  1140. } DIACTIONA, *LPDIACTIONA;
  1141. typedef const DIACTIONA *LPCDIACTIONA;
  1142. typedef struct _DIACTIONW {
  1143. UINT_PTR uAppData;
  1144. DWORD dwSemantic;
  1145. DWORD dwFlags;
  1146. __GNU_EXTENSION union {
  1147. LPCWSTR lptszActionName;
  1148. UINT uResIdString;
  1149. } DUMMYUNIONNAME;
  1150. GUID guidInstance;
  1151. DWORD dwObjID;
  1152. DWORD dwHow;
  1153. } DIACTIONW, *LPDIACTIONW;
  1154. typedef const DIACTIONW *LPCDIACTIONW;
  1155. DECL_WINELIB_TYPE_AW(DIACTION)
  1156. DECL_WINELIB_TYPE_AW(LPDIACTION)
  1157. DECL_WINELIB_TYPE_AW(LPCDIACTION)
  1158. #define DIA_FORCEFEEDBACK 0x00000001
  1159. #define DIA_APPMAPPED 0x00000002
  1160. #define DIA_APPNOMAP 0x00000004
  1161. #define DIA_NORANGE 0x00000008
  1162. #define DIA_APPFIXED 0x00000010
  1163. #define DIAH_UNMAPPED 0x00000000
  1164. #define DIAH_USERCONFIG 0x00000001
  1165. #define DIAH_APPREQUESTED 0x00000002
  1166. #define DIAH_HWAPP 0x00000004
  1167. #define DIAH_HWDEFAULT 0x00000008
  1168. #define DIAH_DEFAULT 0x00000020
  1169. #define DIAH_ERROR 0x80000000
  1170. typedef struct _DIACTIONFORMATA {
  1171. DWORD dwSize;
  1172. DWORD dwActionSize;
  1173. DWORD dwDataSize;
  1174. DWORD dwNumActions;
  1175. LPDIACTIONA rgoAction;
  1176. GUID guidActionMap;
  1177. DWORD dwGenre;
  1178. DWORD dwBufferSize;
  1179. LONG lAxisMin;
  1180. LONG lAxisMax;
  1181. HINSTANCE hInstString;
  1182. FILETIME ftTimeStamp;
  1183. DWORD dwCRC;
  1184. CHAR tszActionMap[MAX_PATH];
  1185. } DIACTIONFORMATA, *LPDIACTIONFORMATA;
  1186. typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
  1187. typedef struct _DIACTIONFORMATW {
  1188. DWORD dwSize;
  1189. DWORD dwActionSize;
  1190. DWORD dwDataSize;
  1191. DWORD dwNumActions;
  1192. LPDIACTIONW rgoAction;
  1193. GUID guidActionMap;
  1194. DWORD dwGenre;
  1195. DWORD dwBufferSize;
  1196. LONG lAxisMin;
  1197. LONG lAxisMax;
  1198. HINSTANCE hInstString;
  1199. FILETIME ftTimeStamp;
  1200. DWORD dwCRC;
  1201. WCHAR tszActionMap[MAX_PATH];
  1202. } DIACTIONFORMATW, *LPDIACTIONFORMATW;
  1203. typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
  1204. DECL_WINELIB_TYPE_AW(DIACTIONFORMAT)
  1205. DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)
  1206. DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)
  1207. #define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
  1208. #define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
  1209. #define DIAFTS_UNUSEDDEVICELOW 0x00000000
  1210. #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
  1211. #define DIDBAM_DEFAULT 0x00000000
  1212. #define DIDBAM_PRESERVE 0x00000001
  1213. #define DIDBAM_INITIALIZE 0x00000002
  1214. #define DIDBAM_HWDEFAULTS 0x00000004
  1215. #define DIDSAM_DEFAULT 0x00000000
  1216. #define DIDSAM_NOUSER 0x00000001
  1217. #define DIDSAM_FORCESAVE 0x00000002
  1218. #define DICD_DEFAULT 0x00000000
  1219. #define DICD_EDIT 0x00000001
  1220. #ifndef D3DCOLOR_DEFINED
  1221. typedef DWORD D3DCOLOR;
  1222. #define D3DCOLOR_DEFINED
  1223. #endif
  1224. typedef struct _DICOLORSET {
  1225. DWORD dwSize;
  1226. D3DCOLOR cTextFore;
  1227. D3DCOLOR cTextHighlight;
  1228. D3DCOLOR cCalloutLine;
  1229. D3DCOLOR cCalloutHighlight;
  1230. D3DCOLOR cBorder;
  1231. D3DCOLOR cControlFill;
  1232. D3DCOLOR cHighlightFill;
  1233. D3DCOLOR cAreaFill;
  1234. } DICOLORSET, *LPDICOLORSET;
  1235. typedef const DICOLORSET *LPCDICOLORSET;
  1236. typedef struct _DICONFIGUREDEVICESPARAMSA {
  1237. DWORD dwSize;
  1238. DWORD dwcUsers;
  1239. LPSTR lptszUserNames;
  1240. DWORD dwcFormats;
  1241. LPDIACTIONFORMATA lprgFormats;
  1242. HWND hwnd;
  1243. DICOLORSET dics;
  1244. LPUNKNOWN lpUnkDDSTarget;
  1245. } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
  1246. typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
  1247. typedef struct _DICONFIGUREDEVICESPARAMSW {
  1248. DWORD dwSize;
  1249. DWORD dwcUsers;
  1250. LPWSTR lptszUserNames;
  1251. DWORD dwcFormats;
  1252. LPDIACTIONFORMATW lprgFormats;
  1253. HWND hwnd;
  1254. DICOLORSET dics;
  1255. LPUNKNOWN lpUnkDDSTarget;
  1256. } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
  1257. typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
  1258. DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)
  1259. DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)
  1260. DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)
  1261. #define DIDIFT_CONFIGURATION 0x00000001
  1262. #define DIDIFT_OVERLAY 0x00000002
  1263. #define DIDAL_CENTERED 0x00000000
  1264. #define DIDAL_LEFTALIGNED 0x00000001
  1265. #define DIDAL_RIGHTALIGNED 0x00000002
  1266. #define DIDAL_MIDDLE 0x00000000
  1267. #define DIDAL_TOPALIGNED 0x00000004
  1268. #define DIDAL_BOTTOMALIGNED 0x00000008
  1269. typedef struct _DIDEVICEIMAGEINFOA {
  1270. CHAR tszImagePath[MAX_PATH];
  1271. DWORD dwFlags;
  1272. DWORD dwViewID;
  1273. RECT rcOverlay;
  1274. DWORD dwObjID;
  1275. DWORD dwcValidPts;
  1276. POINT rgptCalloutLine[5];
  1277. RECT rcCalloutRect;
  1278. DWORD dwTextAlign;
  1279. } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
  1280. typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
  1281. typedef struct _DIDEVICEIMAGEINFOW {
  1282. WCHAR tszImagePath[MAX_PATH];
  1283. DWORD dwFlags;
  1284. DWORD dwViewID;
  1285. RECT rcOverlay;
  1286. DWORD dwObjID;
  1287. DWORD dwcValidPts;
  1288. POINT rgptCalloutLine[5];
  1289. RECT rcCalloutRect;
  1290. DWORD dwTextAlign;
  1291. } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
  1292. typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
  1293. DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)
  1294. DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)
  1295. DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)
  1296. typedef struct _DIDEVICEIMAGEINFOHEADERA {
  1297. DWORD dwSize;
  1298. DWORD dwSizeImageInfo;
  1299. DWORD dwcViews;
  1300. DWORD dwcButtons;
  1301. DWORD dwcAxes;
  1302. DWORD dwcPOVs;
  1303. DWORD dwBufferSize;
  1304. DWORD dwBufferUsed;
  1305. LPDIDEVICEIMAGEINFOA lprgImageInfoArray;
  1306. } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
  1307. typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
  1308. typedef struct _DIDEVICEIMAGEINFOHEADERW {
  1309. DWORD dwSize;
  1310. DWORD dwSizeImageInfo;
  1311. DWORD dwcViews;
  1312. DWORD dwcButtons;
  1313. DWORD dwcAxes;
  1314. DWORD dwcPOVs;
  1315. DWORD dwBufferSize;
  1316. DWORD dwBufferUsed;
  1317. LPDIDEVICEIMAGEINFOW lprgImageInfoArray;
  1318. } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
  1319. typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
  1320. DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)
  1321. DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)
  1322. DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)
  1323. #endif /* DI8 */
  1324. /*****************************************************************************
  1325. * IDirectInputEffect interface
  1326. */
  1327. #if (DIRECTINPUT_VERSION >= 0x0500)
  1328. #undef INTERFACE
  1329. #define INTERFACE IDirectInputEffect
  1330. DECLARE_INTERFACE_(IDirectInputEffect,IUnknown)
  1331. {
  1332. /*** IUnknown methods ***/
  1333. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1334. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1335. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1336. /*** IDirectInputEffect methods ***/
  1337. STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE;
  1338. STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
  1339. STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE;
  1340. STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE;
  1341. STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE;
  1342. STDMETHOD(Stop)(THIS) PURE;
  1343. STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
  1344. STDMETHOD(Download)(THIS) PURE;
  1345. STDMETHOD(Unload)(THIS) PURE;
  1346. STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1347. };
  1348. #if !defined(__cplusplus) || defined(CINTERFACE)
  1349. /*** IUnknown methods ***/
  1350. #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1351. #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
  1352. #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
  1353. /*** IDirectInputEffect methods ***/
  1354. #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1355. #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
  1356. #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
  1357. #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
  1358. #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
  1359. #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
  1360. #define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a)
  1361. #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
  1362. #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
  1363. #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1364. #else
  1365. /*** IUnknown methods ***/
  1366. #define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1367. #define IDirectInputEffect_AddRef(p) (p)->AddRef()
  1368. #define IDirectInputEffect_Release(p) (p)->Release()
  1369. /*** IDirectInputEffect methods ***/
  1370. #define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1371. #define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
  1372. #define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
  1373. #define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
  1374. #define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
  1375. #define IDirectInputEffect_Stop(p) (p)->Stop()
  1376. #define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a)
  1377. #define IDirectInputEffect_Download(p) (p)->Download()
  1378. #define IDirectInputEffect_Unload(p) (p)->Unload()
  1379. #define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
  1380. #endif
  1381. #endif /* DI5 */
  1382. /*****************************************************************************
  1383. * IDirectInputDeviceA interface
  1384. */
  1385. #undef INTERFACE
  1386. #define INTERFACE IDirectInputDeviceA
  1387. DECLARE_INTERFACE_(IDirectInputDeviceA,IUnknown)
  1388. {
  1389. /*** IUnknown methods ***/
  1390. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1391. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1392. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1393. /*** IDirectInputDeviceA methods ***/
  1394. STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
  1395. STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  1396. STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
  1397. STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
  1398. STDMETHOD(Acquire)(THIS) PURE;
  1399. STDMETHOD(Unacquire)(THIS) PURE;
  1400. STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
  1401. STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
  1402. STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
  1403. STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
  1404. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
  1405. STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
  1406. STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
  1407. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  1408. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
  1409. };
  1410. /*****************************************************************************
  1411. * IDirectInputDeviceW interface
  1412. */
  1413. #undef INTERFACE
  1414. #define INTERFACE IDirectInputDeviceW
  1415. DECLARE_INTERFACE_(IDirectInputDeviceW,IUnknown)
  1416. {
  1417. /*** IUnknown methods ***/
  1418. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1419. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1420. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1421. /*** IDirectInputDeviceW methods ***/
  1422. STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
  1423. STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  1424. STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
  1425. STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
  1426. STDMETHOD(Acquire)(THIS) PURE;
  1427. STDMETHOD(Unacquire)(THIS) PURE;
  1428. STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
  1429. STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
  1430. STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
  1431. STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
  1432. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
  1433. STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
  1434. STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
  1435. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  1436. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
  1437. };
  1438. #if !defined(__cplusplus) || defined(CINTERFACE)
  1439. /*** IUnknown methods ***/
  1440. #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1441. #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
  1442. #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
  1443. /*** IDirectInputDevice methods ***/
  1444. #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1445. #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1446. #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1447. #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1448. #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
  1449. #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1450. #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1451. #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1452. #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1453. #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1454. #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1455. #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1456. #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1457. #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1458. #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1459. #else
  1460. /*** IUnknown methods ***/
  1461. #define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1462. #define IDirectInputDevice_AddRef(p) (p)->AddRef()
  1463. #define IDirectInputDevice_Release(p) (p)->Release()
  1464. /*** IDirectInputDevice methods ***/
  1465. #define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1466. #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1467. #define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1468. #define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1469. #define IDirectInputDevice_Acquire(p) (p)->Acquire()
  1470. #define IDirectInputDevice_Unacquire(p) (p)->Unacquire()
  1471. #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1472. #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1473. #define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1474. #define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1475. #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1476. #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1477. #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1478. #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1479. #define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1480. #endif
  1481. #if (DIRECTINPUT_VERSION >= 0x0500)
  1482. /*****************************************************************************
  1483. * IDirectInputDevice2A interface
  1484. */
  1485. #undef INTERFACE
  1486. #define INTERFACE IDirectInputDevice2A
  1487. DECLARE_INTERFACE_(IDirectInputDevice2A,IDirectInputDeviceA)
  1488. {
  1489. /*** IUnknown methods ***/
  1490. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1491. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1492. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1493. /*** IDirectInputDeviceA methods ***/
  1494. STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
  1495. STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  1496. STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
  1497. STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
  1498. STDMETHOD(Acquire)(THIS) PURE;
  1499. STDMETHOD(Unacquire)(THIS) PURE;
  1500. STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
  1501. STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
  1502. STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
  1503. STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
  1504. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
  1505. STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
  1506. STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
  1507. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  1508. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
  1509. /*** IDirectInputDevice2A methods ***/
  1510. STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
  1511. STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
  1512. STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
  1513. STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
  1514. STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
  1515. STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
  1516. STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
  1517. STDMETHOD(Poll)(THIS) PURE;
  1518. STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
  1519. };
  1520. /*****************************************************************************
  1521. * IDirectInputDevice2W interface
  1522. */
  1523. #undef INTERFACE
  1524. #define INTERFACE IDirectInputDevice2W
  1525. DECLARE_INTERFACE_(IDirectInputDevice2W,IDirectInputDeviceW)
  1526. {
  1527. /*** IUnknown methods ***/
  1528. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1529. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1530. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1531. /*** IDirectInputDeviceW methods ***/
  1532. STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
  1533. STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  1534. STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
  1535. STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
  1536. STDMETHOD(Acquire)(THIS) PURE;
  1537. STDMETHOD(Unacquire)(THIS) PURE;
  1538. STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
  1539. STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
  1540. STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
  1541. STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
  1542. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
  1543. STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
  1544. STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
  1545. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  1546. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
  1547. /*** IDirectInputDevice2W methods ***/
  1548. STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
  1549. STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
  1550. STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
  1551. STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
  1552. STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
  1553. STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
  1554. STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
  1555. STDMETHOD(Poll)(THIS) PURE;
  1556. STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
  1557. };
  1558. #if !defined(__cplusplus) || defined(CINTERFACE)
  1559. /*** IUnknown methods ***/
  1560. #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1561. #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1562. #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
  1563. /*** IDirectInputDevice methods ***/
  1564. #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1565. #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1566. #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1567. #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1568. #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
  1569. #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1570. #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1571. #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1572. #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1573. #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1574. #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1575. #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1576. #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1577. #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1578. #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1579. /*** IDirectInputDevice2 methods ***/
  1580. #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1581. #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1582. #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1583. #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1584. #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1585. #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1586. #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1587. #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
  1588. #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1589. #else
  1590. /*** IUnknown methods ***/
  1591. #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1592. #define IDirectInputDevice2_AddRef(p) (p)->AddRef()
  1593. #define IDirectInputDevice2_Release(p) (p)->Release()
  1594. /*** IDirectInputDevice methods ***/
  1595. #define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1596. #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1597. #define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1598. #define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1599. #define IDirectInputDevice2_Acquire(p) (p)->Acquire()
  1600. #define IDirectInputDevice2_Unacquire(p) (p)->Unacquire()
  1601. #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1602. #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1603. #define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1604. #define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1605. #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1606. #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1607. #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1608. #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1609. #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1610. /*** IDirectInputDevice2 methods ***/
  1611. #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1612. #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1613. #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1614. #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1615. #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1616. #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1617. #define IDirectInputDevice2_Escape(p,a) (p)->Escape(a)
  1618. #define IDirectInputDevice2_Poll(p) (p)->Poll()
  1619. #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1620. #endif
  1621. #endif /* DI5 */
  1622. #if DIRECTINPUT_VERSION >= 0x0700
  1623. /*****************************************************************************
  1624. * IDirectInputDevice7A interface
  1625. */
  1626. #undef INTERFACE
  1627. #define INTERFACE IDirectInputDevice7A
  1628. DECLARE_INTERFACE_(IDirectInputDevice7A,IDirectInputDevice2A)
  1629. {
  1630. /*** IUnknown methods ***/
  1631. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1632. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1633. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1634. /*** IDirectInputDeviceA methods ***/
  1635. STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
  1636. STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  1637. STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
  1638. STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
  1639. STDMETHOD(Acquire)(THIS) PURE;
  1640. STDMETHOD(Unacquire)(THIS) PURE;
  1641. STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
  1642. STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
  1643. STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
  1644. STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
  1645. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
  1646. STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
  1647. STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
  1648. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  1649. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
  1650. /*** IDirectInputDevice2A methods ***/
  1651. STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
  1652. STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
  1653. STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
  1654. STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
  1655. STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
  1656. STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
  1657. STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
  1658. STDMETHOD(Poll)(THIS) PURE;
  1659. STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
  1660. /*** IDirectInputDevice7A methods ***/
  1661. STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
  1662. STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
  1663. };
  1664. /*****************************************************************************
  1665. * IDirectInputDevice7W interface
  1666. */
  1667. #undef INTERFACE
  1668. #define INTERFACE IDirectInputDevice7W
  1669. DECLARE_INTERFACE_(IDirectInputDevice7W,IDirectInputDevice2W)
  1670. {
  1671. /*** IUnknown methods ***/
  1672. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1673. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1674. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1675. /*** IDirectInputDeviceW methods ***/
  1676. STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
  1677. STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  1678. STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
  1679. STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
  1680. STDMETHOD(Acquire)(THIS) PURE;
  1681. STDMETHOD(Unacquire)(THIS) PURE;
  1682. STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
  1683. STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
  1684. STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
  1685. STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
  1686. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
  1687. STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
  1688. STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
  1689. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  1690. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
  1691. /*** IDirectInputDevice2W methods ***/
  1692. STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
  1693. STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
  1694. STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
  1695. STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
  1696. STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
  1697. STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
  1698. STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
  1699. STDMETHOD(Poll)(THIS) PURE;
  1700. STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
  1701. /*** IDirectInputDevice7W methods ***/
  1702. STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
  1703. STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
  1704. };
  1705. #if !defined(__cplusplus) || defined(CINTERFACE)
  1706. /*** IUnknown methods ***/
  1707. #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1708. #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1709. #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
  1710. /*** IDirectInputDevice methods ***/
  1711. #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1712. #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1713. #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1714. #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1715. #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
  1716. #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1717. #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1718. #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1719. #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1720. #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1721. #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1722. #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1723. #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1724. #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1725. #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1726. /*** IDirectInputDevice2 methods ***/
  1727. #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1728. #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1729. #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1730. #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1731. #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1732. #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1733. #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1734. #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
  1735. #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1736. /*** IDirectInputDevice7 methods ***/
  1737. #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
  1738. #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
  1739. #else
  1740. /*** IUnknown methods ***/
  1741. #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1742. #define IDirectInputDevice7_AddRef(p) (p)->AddRef()
  1743. #define IDirectInputDevice7_Release(p) (p)->Release()
  1744. /*** IDirectInputDevice methods ***/
  1745. #define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1746. #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1747. #define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1748. #define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1749. #define IDirectInputDevice7_Acquire(p) (p)->Acquire()
  1750. #define IDirectInputDevice7_Unacquire(p) (p)->Unacquire()
  1751. #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1752. #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1753. #define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1754. #define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1755. #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1756. #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1757. #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1758. #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1759. #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1760. /*** IDirectInputDevice2 methods ***/
  1761. #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1762. #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1763. #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1764. #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1765. #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1766. #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1767. #define IDirectInputDevice7_Escape(p,a) (p)->Escape(a)
  1768. #define IDirectInputDevice7_Poll(p) (p)->Poll()
  1769. #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1770. /*** IDirectInputDevice7 methods ***/
  1771. #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
  1772. #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
  1773. #endif
  1774. #endif /* DI7 */
  1775. #if DIRECTINPUT_VERSION >= 0x0800
  1776. /*****************************************************************************
  1777. * IDirectInputDevice8A interface
  1778. */
  1779. #undef INTERFACE
  1780. #define INTERFACE IDirectInputDevice8A
  1781. DECLARE_INTERFACE_(IDirectInputDevice8A,IDirectInputDevice7A)
  1782. {
  1783. /*** IUnknown methods ***/
  1784. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1785. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1786. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1787. /*** IDirectInputDeviceA methods ***/
  1788. STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
  1789. STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  1790. STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
  1791. STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
  1792. STDMETHOD(Acquire)(THIS) PURE;
  1793. STDMETHOD(Unacquire)(THIS) PURE;
  1794. STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
  1795. STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
  1796. STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
  1797. STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
  1798. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
  1799. STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
  1800. STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
  1801. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  1802. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
  1803. /*** IDirectInputDevice2A methods ***/
  1804. STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
  1805. STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
  1806. STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
  1807. STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
  1808. STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
  1809. STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
  1810. STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
  1811. STDMETHOD(Poll)(THIS) PURE;
  1812. STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
  1813. /*** IDirectInputDevice7A methods ***/
  1814. STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
  1815. STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
  1816. /*** IDirectInputDevice8A methods ***/
  1817. STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
  1818. STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
  1819. STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
  1820. };
  1821. /*****************************************************************************
  1822. * IDirectInputDevice8W interface
  1823. */
  1824. #undef INTERFACE
  1825. #define INTERFACE IDirectInputDevice8W
  1826. DECLARE_INTERFACE_(IDirectInputDevice8W,IDirectInputDevice7W)
  1827. {
  1828. /*** IUnknown methods ***/
  1829. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1830. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1831. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1832. /*** IDirectInputDeviceW methods ***/
  1833. STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
  1834. STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  1835. STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
  1836. STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
  1837. STDMETHOD(Acquire)(THIS) PURE;
  1838. STDMETHOD(Unacquire)(THIS) PURE;
  1839. STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
  1840. STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
  1841. STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
  1842. STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
  1843. STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
  1844. STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
  1845. STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
  1846. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  1847. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
  1848. /*** IDirectInputDevice2W methods ***/
  1849. STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
  1850. STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
  1851. STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
  1852. STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
  1853. STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
  1854. STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
  1855. STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
  1856. STDMETHOD(Poll)(THIS) PURE;
  1857. STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
  1858. /*** IDirectInputDevice7W methods ***/
  1859. STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
  1860. STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
  1861. /*** IDirectInputDevice8W methods ***/
  1862. STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
  1863. STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
  1864. STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
  1865. };
  1866. #if !defined(__cplusplus) || defined(CINTERFACE)
  1867. /*** IUnknown methods ***/
  1868. #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1869. #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
  1870. #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
  1871. /*** IDirectInputDevice methods ***/
  1872. #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1873. #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1874. #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1875. #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1876. #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
  1877. #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1878. #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1879. #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1880. #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1881. #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1882. #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1883. #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1884. #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1885. #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1886. #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1887. /*** IDirectInputDevice2 methods ***/
  1888. #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1889. #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1890. #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1891. #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1892. #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1893. #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1894. #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1895. #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
  1896. #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1897. /*** IDirectInputDevice7 methods ***/
  1898. #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
  1899. #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
  1900. /*** IDirectInputDevice8 methods ***/
  1901. #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
  1902. #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
  1903. #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
  1904. #else
  1905. /*** IUnknown methods ***/
  1906. #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1907. #define IDirectInputDevice8_AddRef(p) (p)->AddRef()
  1908. #define IDirectInputDevice8_Release(p) (p)->Release()
  1909. /*** IDirectInputDevice methods ***/
  1910. #define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1911. #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1912. #define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1913. #define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1914. #define IDirectInputDevice8_Acquire(p) (p)->Acquire()
  1915. #define IDirectInputDevice8_Unacquire(p) (p)->Unacquire()
  1916. #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1917. #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1918. #define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1919. #define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1920. #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1921. #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1922. #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1923. #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1924. #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1925. /*** IDirectInputDevice2 methods ***/
  1926. #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1927. #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1928. #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1929. #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1930. #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1931. #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1932. #define IDirectInputDevice8_Escape(p,a) (p)->Escape(a)
  1933. #define IDirectInputDevice8_Poll(p) (p)->Poll()
  1934. #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1935. /*** IDirectInputDevice7 methods ***/
  1936. #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
  1937. #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
  1938. /*** IDirectInputDevice8 methods ***/
  1939. #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
  1940. #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c)
  1941. #define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a)
  1942. #endif
  1943. #endif /* DI8 */
  1944. /* "Standard" Mouse report... */
  1945. typedef struct DIMOUSESTATE {
  1946. LONG lX;
  1947. LONG lY;
  1948. LONG lZ;
  1949. BYTE rgbButtons[4];
  1950. } DIMOUSESTATE;
  1951. #if DIRECTINPUT_VERSION >= 0x0700
  1952. /* "Standard" Mouse report for DInput 7... */
  1953. typedef struct DIMOUSESTATE2 {
  1954. LONG lX;
  1955. LONG lY;
  1956. LONG lZ;
  1957. BYTE rgbButtons[8];
  1958. } DIMOUSESTATE2;
  1959. #endif /* DI7 */
  1960. #define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
  1961. #define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
  1962. #define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
  1963. #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
  1964. #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
  1965. #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
  1966. #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
  1967. #if DIRECTINPUT_VERSION >= 0x0700
  1968. #define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
  1969. #define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
  1970. #define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
  1971. #define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
  1972. #endif /* DI7 */
  1973. #ifdef __cplusplus
  1974. extern "C" {
  1975. #endif
  1976. extern const DIDATAFORMAT c_dfDIMouse;
  1977. #if DIRECTINPUT_VERSION >= 0x0700
  1978. extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
  1979. #endif /* DI7 */
  1980. extern const DIDATAFORMAT c_dfDIKeyboard;
  1981. #if DIRECTINPUT_VERSION >= 0x0500
  1982. extern const DIDATAFORMAT c_dfDIJoystick;
  1983. extern const DIDATAFORMAT c_dfDIJoystick2;
  1984. #endif /* DI5 */
  1985. #ifdef __cplusplus
  1986. };
  1987. #endif
  1988. /*****************************************************************************
  1989. * IDirectInputA interface
  1990. */
  1991. #undef INTERFACE
  1992. #define INTERFACE IDirectInputA
  1993. DECLARE_INTERFACE_(IDirectInputA,IUnknown)
  1994. {
  1995. /*** IUnknown methods ***/
  1996. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  1997. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1998. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1999. /*** IDirectInputA methods ***/
  2000. STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
  2001. STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2002. STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
  2003. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  2004. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
  2005. };
  2006. /*****************************************************************************
  2007. * IDirectInputW interface
  2008. */
  2009. #undef INTERFACE
  2010. #define INTERFACE IDirectInputW
  2011. DECLARE_INTERFACE_(IDirectInputW,IUnknown)
  2012. {
  2013. /*** IUnknown methods ***/
  2014. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2015. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2016. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2017. /*** IDirectInputW methods ***/
  2018. STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
  2019. STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2020. STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
  2021. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  2022. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
  2023. };
  2024. #if !defined(__cplusplus) || defined(CINTERFACE)
  2025. /*** IUnknown methods ***/
  2026. #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2027. #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
  2028. #define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
  2029. /*** IDirectInput methods ***/
  2030. #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  2031. #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  2032. #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
  2033. #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  2034. #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2035. #else
  2036. /*** IUnknown methods ***/
  2037. #define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2038. #define IDirectInput_AddRef(p) (p)->AddRef()
  2039. #define IDirectInput_Release(p) (p)->Release()
  2040. /*** IDirectInput methods ***/
  2041. #define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  2042. #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
  2043. #define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
  2044. #define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  2045. #define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b)
  2046. #endif
  2047. /*****************************************************************************
  2048. * IDirectInput2A interface
  2049. */
  2050. #undef INTERFACE
  2051. #define INTERFACE IDirectInput2A
  2052. DECLARE_INTERFACE_(IDirectInput2A,IDirectInputA)
  2053. {
  2054. /*** IUnknown methods ***/
  2055. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2056. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2057. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2058. /*** IDirectInputA methods ***/
  2059. STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
  2060. STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2061. STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
  2062. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  2063. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
  2064. /*** IDirectInput2A methods ***/
  2065. STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
  2066. };
  2067. /*****************************************************************************
  2068. * IDirectInput2W interface
  2069. */
  2070. #undef INTERFACE
  2071. #define INTERFACE IDirectInput2W
  2072. DECLARE_INTERFACE_(IDirectInput2W,IDirectInputW)
  2073. {
  2074. /*** IUnknown methods ***/
  2075. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2076. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2077. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2078. /*** IDirectInputW methods ***/
  2079. STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
  2080. STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2081. STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
  2082. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  2083. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
  2084. /*** IDirectInput2W methods ***/
  2085. STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
  2086. };
  2087. #if !defined(__cplusplus) || defined(CINTERFACE)
  2088. /*** IUnknown methods ***/
  2089. #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2090. #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
  2091. #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
  2092. /*** IDirectInput methods ***/
  2093. #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  2094. #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  2095. #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
  2096. #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  2097. #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2098. /*** IDirectInput2 methods ***/
  2099. #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
  2100. #else
  2101. /*** IUnknown methods ***/
  2102. #define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2103. #define IDirectInput2_AddRef(p) (p)->AddRef()
  2104. #define IDirectInput2_Release(p) (p)->Release()
  2105. /*** IDirectInput methods ***/
  2106. #define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  2107. #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
  2108. #define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
  2109. #define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  2110. #define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b)
  2111. /*** IDirectInput2 methods ***/
  2112. #define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
  2113. #endif
  2114. /*****************************************************************************
  2115. * IDirectInput7A interface
  2116. */
  2117. #undef INTERFACE
  2118. #define INTERFACE IDirectInput7A
  2119. DECLARE_INTERFACE_(IDirectInput7A,IDirectInput2A)
  2120. {
  2121. /*** IUnknown methods ***/
  2122. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2123. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2124. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2125. /*** IDirectInputA methods ***/
  2126. STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
  2127. STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2128. STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
  2129. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  2130. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
  2131. /*** IDirectInput2A methods ***/
  2132. STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
  2133. /*** IDirectInput7A methods ***/
  2134. STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
  2135. };
  2136. /*****************************************************************************
  2137. * IDirectInput7W interface
  2138. */
  2139. #undef INTERFACE
  2140. #define INTERFACE IDirectInput7W
  2141. DECLARE_INTERFACE_(IDirectInput7W,IDirectInput2W)
  2142. {
  2143. /*** IUnknown methods ***/
  2144. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2145. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2146. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2147. /*** IDirectInputW methods ***/
  2148. STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
  2149. STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2150. STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
  2151. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  2152. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
  2153. /*** IDirectInput2W methods ***/
  2154. STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
  2155. /*** IDirectInput7W methods ***/
  2156. STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
  2157. };
  2158. #if !defined(__cplusplus) || defined(CINTERFACE)
  2159. /*** IUnknown methods ***/
  2160. #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2161. #define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
  2162. #define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
  2163. /*** IDirectInput methods ***/
  2164. #define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  2165. #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  2166. #define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
  2167. #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  2168. #define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2169. /*** IDirectInput2 methods ***/
  2170. #define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
  2171. /*** IDirectInput7 methods ***/
  2172. #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
  2173. #else
  2174. /*** IUnknown methods ***/
  2175. #define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2176. #define IDirectInput7_AddRef(p) (p)->AddRef()
  2177. #define IDirectInput7_Release(p) (p)->Release()
  2178. /*** IDirectInput methods ***/
  2179. #define IDirectInput7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  2180. #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
  2181. #define IDirectInput7_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
  2182. #define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  2183. #define IDirectInput7_Initialize(p,a,b) (p)->Initialize(a,b)
  2184. /*** IDirectInput2 methods ***/
  2185. #define IDirectInput7_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
  2186. /*** IDirectInput7 methods ***/
  2187. #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
  2188. #endif
  2189. #if DIRECTINPUT_VERSION >= 0x0800
  2190. /*****************************************************************************
  2191. * IDirectInput8A interface
  2192. */
  2193. #undef INTERFACE
  2194. #define INTERFACE IDirectInput8A
  2195. DECLARE_INTERFACE_(IDirectInput8A,IUnknown)
  2196. {
  2197. /*** IUnknown methods ***/
  2198. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2199. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2200. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2201. /*** IDirectInput8A methods ***/
  2202. STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
  2203. STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2204. STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
  2205. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  2206. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
  2207. STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
  2208. STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2209. STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
  2210. };
  2211. /*****************************************************************************
  2212. * IDirectInput8W interface
  2213. */
  2214. #undef INTERFACE
  2215. #define INTERFACE IDirectInput8W
  2216. DECLARE_INTERFACE_(IDirectInput8W,IUnknown)
  2217. {
  2218. /*** IUnknown methods ***/
  2219. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  2220. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2221. STDMETHOD_(ULONG,Release)(THIS) PURE;
  2222. /*** IDirectInput8W methods ***/
  2223. STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
  2224. STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2225. STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
  2226. STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
  2227. STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
  2228. STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
  2229. STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
  2230. STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
  2231. };
  2232. #undef INTERFACE
  2233. #if !defined(__cplusplus) || defined(CINTERFACE)
  2234. /*** IUnknown methods ***/
  2235. #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2236. #define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
  2237. #define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
  2238. /*** IDirectInput8 methods ***/
  2239. #define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  2240. #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  2241. #define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
  2242. #define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  2243. #define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2244. #define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
  2245. #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
  2246. #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
  2247. #else
  2248. /*** IUnknown methods ***/
  2249. #define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2250. #define IDirectInput8_AddRef(p) (p)->AddRef()
  2251. #define IDirectInput8_Release(p) (p)->Release()
  2252. /*** IDirectInput8 methods ***/
  2253. #define IDirectInput8_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  2254. #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
  2255. #define IDirectInput8_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
  2256. #define IDirectInput8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  2257. #define IDirectInput8_Initialize(p,a,b) (p)->Initialize(a,b)
  2258. #define IDirectInput8_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
  2259. #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
  2260. #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
  2261. #endif
  2262. #endif /* DI8 */
  2263. /* Export functions */
  2264. #ifdef __cplusplus
  2265. extern "C" {
  2266. #endif
  2267. #if DIRECTINPUT_VERSION >= 0x0800
  2268. HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
  2269. #else /* DI < 8 */
  2270. HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
  2271. HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTW *,LPUNKNOWN);
  2272. #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
  2273. HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
  2274. #endif /* DI8 */
  2275. #ifdef __cplusplus
  2276. };
  2277. #endif
  2278. #endif /* __DINPUT_INCLUDED__ */