10 #ifndef __DINPUT_INCLUDED__
11 #define __DINPUT_INCLUDED__
16 #define COM_NO_WINDOWS_H
26 #ifndef DIRECTINPUT_VERSION
27 #define DIRECTINPUT_VERSION 0x0500
37 DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
38 DEFINE_GUID(CLSID_DirectInputDevice,0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
46 DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
47 DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
48 DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
49 DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
51 DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
52 DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
53 DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
54 DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
56 DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
64 DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
65 DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
66 DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
67 DEFINE_GUID(GUID_RxAxis, 0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
68 DEFINE_GUID(GUID_RyAxis, 0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
69 DEFINE_GUID(GUID_RzAxis, 0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
70 DEFINE_GUID(GUID_Slider, 0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
72 DEFINE_GUID(GUID_Button, 0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
73 DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
75 DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
77 DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
85 DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
86 DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
87 DEFINE_GUID(GUID_Joystick ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
95 DEFINE_GUID(GUID_ConstantForce,0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
96 DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
97 DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
98 DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
99 DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
100 DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
101 DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
102 DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
103 DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
104 DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
105 DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
106 DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
117 #if(DIRECTINPUT_VERSION >= 0x0500)
125 #define DIEFT_ALL 0x00000000
127 #define DIEFT_CONSTANTFORCE 0x00000001
128 #define DIEFT_RAMPFORCE 0x00000002
129 #define DIEFT_PERIODIC 0x00000003
130 #define DIEFT_CONDITION 0x00000004
131 #define DIEFT_CUSTOMFORCE 0x00000005
132 #define DIEFT_HARDWARE 0x000000FF
134 #define DIEFT_FFATTACK 0x00000200
135 #define DIEFT_FFFADE 0x00000400
136 #define DIEFT_SATURATION 0x00000800
137 #define DIEFT_POSNEGCOEFFICIENTS 0x00001000
138 #define DIEFT_POSNEGSATURATION 0x00002000
139 #define DIEFT_DEADBAND 0x00004000
141 #define DIEFT_GETTYPE(n) LOBYTE(n)
143 #define DI_DEGREES 100
144 #define DI_FFNOMINALMAX 10000
145 #define DI_SECONDS 1000000
210 #define DIEFF_OBJECTIDS 0x00000001
211 #define DIEFF_OBJECTOFFSETS 0x00000002
212 #define DIEFF_CARTESIAN 0x00000010
213 #define DIEFF_POLAR 0x00000020
214 #define DIEFF_SPHERICAL 0x00000040
216 #define DIEP_DURATION 0x00000001
217 #define DIEP_SAMPLEPERIOD 0x00000002
218 #define DIEP_GAIN 0x00000004
219 #define DIEP_TRIGGERBUTTON 0x00000008
220 #define DIEP_TRIGGERREPEATINTERVAL 0x00000010
221 #define DIEP_AXES 0x00000020
222 #define DIEP_DIRECTION 0x00000040
223 #define DIEP_ENVELOPE 0x00000080
224 #define DIEP_TYPESPECIFICPARAMS 0x00000100
225 #define DIEP_ALLPARAMS 0x000001FF
226 #define DIEP_START 0x20000000
227 #define DIEP_NORESTART 0x40000000
228 #define DIEP_NODOWNLOAD 0x80000000
229 #define DIEB_NOTRIGGER 0xFFFFFFFF
231 #define DIES_SOLO 0x00000001
232 #define DIES_NODOWNLOAD 0x80000000
234 #define DIEGES_PLAYING 0x00000001
235 #define DIEGES_EMULATED 0x00000002
249 #define INTERFACE IDirectInputEffect
254 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
255 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
256 STDMETHOD_(ULONG,Release)(THIS) PURE;
260 STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
264 STDMETHOD(Stop)(THIS) PURE;
265 STDMETHOD(GetEffectStatus)(THIS_
LPDWORD) PURE;
266 STDMETHOD(Download)(THIS) PURE;
267 STDMETHOD(Unload)(THIS) PURE;
273 #if !defined(__cplusplus) || defined(CINTERFACE)
274 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
275 #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
276 #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
277 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
278 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
279 #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
280 #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
281 #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
282 #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
283 #define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a)
284 #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
285 #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
286 #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
288 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
289 #define IDirectInputEffect_AddRef(p) (p)->AddRef()
290 #define IDirectInputEffect_Release(p) (p)->Release()
291 #define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
292 #define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
293 #define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
294 #define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
295 #define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
296 #define IDirectInputEffect_Stop(p) (p)->Stop()
297 #define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a)
298 #define IDirectInputEffect_Download(p) (p)->Download()
299 #define IDirectInputEffect_Unload(p) (p)->Unload()
300 #define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
313 #define DIDEVTYPE_DEVICE 1
314 #define DIDEVTYPE_MOUSE 2
315 #define DIDEVTYPE_KEYBOARD 3
316 #define DIDEVTYPE_JOYSTICK 4
317 #define DIDEVTYPE_HID 0x00010000
319 #define DIDEVTYPEMOUSE_UNKNOWN 1
320 #define DIDEVTYPEMOUSE_TRADITIONAL 2
321 #define DIDEVTYPEMOUSE_FINGERSTICK 3
322 #define DIDEVTYPEMOUSE_TOUCHPAD 4
323 #define DIDEVTYPEMOUSE_TRACKBALL 5
325 #define DIDEVTYPEKEYBOARD_UNKNOWN 0
326 #define DIDEVTYPEKEYBOARD_PCXT 1
327 #define DIDEVTYPEKEYBOARD_OLIVETTI 2
328 #define DIDEVTYPEKEYBOARD_PCAT 3
329 #define DIDEVTYPEKEYBOARD_PCENH 4
330 #define DIDEVTYPEKEYBOARD_NOKIA1050 5
331 #define DIDEVTYPEKEYBOARD_NOKIA9140 6
332 #define DIDEVTYPEKEYBOARD_NEC98 7
333 #define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
334 #define DIDEVTYPEKEYBOARD_NEC98106 9
335 #define DIDEVTYPEKEYBOARD_JAPAN106 10
336 #define DIDEVTYPEKEYBOARD_JAPANAX 11
337 #define DIDEVTYPEKEYBOARD_J3100 12
339 #define DIDEVTYPEJOYSTICK_UNKNOWN 1
340 #define DIDEVTYPEJOYSTICK_TRADITIONAL 2
341 #define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
342 #define DIDEVTYPEJOYSTICK_GAMEPAD 4
343 #define DIDEVTYPEJOYSTICK_RUDDER 5
344 #define DIDEVTYPEJOYSTICK_WHEEL 6
345 #define DIDEVTYPEJOYSTICK_HEADTRACKER 7
347 #define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
348 #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
350 #if(DIRECTINPUT_VERSION >= 0x0500)
370 #if(DIRECTINPUT_VERSION >= 0x0500)
379 #define DIDC_ATTACHED 0x00000001
380 #define DIDC_POLLEDDEVICE 0x00000002
381 #define DIDC_EMULATED 0x00000004
382 #define DIDC_POLLEDDATAFORMAT 0x00000008
383 #if(DIRECTINPUT_VERSION >= 0x0500)
384 #define DIDC_FORCEFEEDBACK 0x00000100
385 #define DIDC_FFATTACK 0x00000200
386 #define DIDC_FFFADE 0x00000400
387 #define DIDC_SATURATION 0x00000800
388 #define DIDC_POSNEGCOEFFICIENTS 0x00001000
389 #define DIDC_POSNEGSATURATION 0x00002000
390 #define DIDC_DEADBAND 0x00004000
393 #define DIDFT_ALL 0x00000000
395 #define DIDFT_RELAXIS 0x00000001
396 #define DIDFT_ABSAXIS 0x00000002
397 #define DIDFT_AXIS 0x00000003
399 #define DIDFT_PSHBUTTON 0x00000004
400 #define DIDFT_TGLBUTTON 0x00000008
401 #define DIDFT_BUTTON 0x0000000C
403 #define DIDFT_POV 0x00000010
405 #define DIDFT_COLLECTION 0x00000040
406 #define DIDFT_NODATA 0x00000080
408 #define DIDFT_ANYINSTANCE 0x00FFFF00
409 #define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
410 #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
411 #define DIDFT_GETTYPE(n) LOBYTE(n)
412 #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
413 #define DIDFT_FFACTUATOR 0x01000000
414 #define DIDFT_FFEFFECTTRIGGER 0x02000000
416 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
417 #define DIDFT_NOCOLLECTION 0x00FFFF00
440 #define DIDF_ABSAXIS 0x00000001
441 #define DIDF_RELAXIS 0x00000002
448 #if(DIRECTINPUT_VERSION >= 0x0500)
486 #if(DIRECTINPUT_VERSION >= 0x0500)
505 #if(DIRECTINPUT_VERSION >= 0x0500)
531 #define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKW
533 #define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKA
536 #if(DIRECTINPUT_VERSION >= 0x0500)
537 #define DIDOI_FFACTUATOR 0x00000001
538 #define DIDOI_FFEFFECTTRIGGER 0x00000002
539 #define DIDOI_POLLED 0x00008000
540 #define DIDOI_ASPECTPOSITION 0x00000100
541 #define DIDOI_ASPECTVELOCITY 0x00000200
542 #define DIDOI_ASPECTACCEL 0x00000300
543 #define DIDOI_ASPECTFORCE 0x00000400
544 #define DIDOI_ASPECTMASK 0x00000F00
555 #define DIPH_DEVICE 0
556 #define DIPH_BYOFFSET 1
572 #define DIPROPRANGE_NOMIN ((LONG)0x80000000)
573 #define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
576 #define MAKEDIPROP(prop) (*(const GUID *)(prop))
578 #define MAKEDIPROP(prop) ((REFGUID)(prop))
581 #define DIPROP_BUFFERSIZE MAKEDIPROP(1)
583 #define DIPROP_AXISMODE MAKEDIPROP(2)
585 #define DIPROPAXISMODE_ABS 0
586 #define DIPROPAXISMODE_REL 1
588 #define DIPROP_GRANULARITY MAKEDIPROP(3)
590 #define DIPROP_RANGE MAKEDIPROP(4)
592 #define DIPROP_DEADZONE MAKEDIPROP(5)
594 #define DIPROP_SATURATION MAKEDIPROP(6)
596 #define DIPROP_FFGAIN MAKEDIPROP(7)
598 #define DIPROP_FFLOAD MAKEDIPROP(8)
600 #define DIPROP_AUTOCENTER MAKEDIPROP(9)
602 #define DIPROPAUTOCENTER_OFF 0
603 #define DIPROPAUTOCENTER_ON 1
605 #define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
607 #define DIPROPCALIBRATIONMODE_COOKED 0
608 #define DIPROPCALIBRATIONMODE_RAW 1
618 #define DIGDD_PEEK 0x00000001
620 #define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
621 ((int)((dwSequence1) - (dwSequence2)) cmp 0)
622 #define DISCL_EXCLUSIVE 0x00000001
623 #define DISCL_NONEXCLUSIVE 0x00000002
624 #define DISCL_FOREGROUND 0x00000004
625 #define DISCL_BACKGROUND 0x00000008
627 #if(DIRECTINPUT_VERSION >= 0x0500)
665 #if(DIRECTINPUT_VERSION >= 0x0500)
678 #if(DIRECTINPUT_VERSION >= 0x0500)
696 #define INTERFACE IDirectInputDeviceW
701 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
702 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
703 STDMETHOD_(ULONG,Release)(THIS) PURE;
706 STDMETHOD(GetCapabilities)(THIS_
LPDIDEVCAPS) PURE;
707 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,
LPVOID,
DWORD) PURE;
710 STDMETHOD(Acquire)(THIS) PURE;
711 STDMETHOD(Unacquire)(THIS) PURE;
712 STDMETHOD(GetDeviceState)(THIS_
DWORD,
LPVOID) PURE;
715 STDMETHOD(SetEventNotification)(THIS_
HANDLE) PURE;
716 STDMETHOD(SetCooperativeLevel)(THIS_
HWND,
DWORD) PURE;
719 STDMETHOD(RunControlPanel)(THIS_
HWND,
DWORD) PURE;
726 #define INTERFACE IDirectInputDeviceA
731 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
732 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
733 STDMETHOD_(ULONG,Release)(THIS) PURE;
736 STDMETHOD(GetCapabilities)(THIS_
LPDIDEVCAPS) PURE;
737 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,
LPVOID,
DWORD) PURE;
740 STDMETHOD(Acquire)(THIS) PURE;
741 STDMETHOD(Unacquire)(THIS) PURE;
742 STDMETHOD(GetDeviceState)(THIS_
DWORD,
LPVOID) PURE;
745 STDMETHOD(SetEventNotification)(THIS_
HANDLE) PURE;
746 STDMETHOD(SetCooperativeLevel)(THIS_
HWND,
DWORD) PURE;
749 STDMETHOD(RunControlPanel)(THIS_
HWND,
DWORD) PURE;
756 #define IID_IDirectInputDevice IID_IDirectInputDeviceW
757 #define IDirectInputDevice IDirectInputDeviceW
758 #define IDirectInputDeviceVtbl IDirectInputDeviceWVtbl
760 #define IID_IDirectInputDevice IID_IDirectInputDeviceA
761 #define IDirectInputDevice IDirectInputDeviceA
762 #define IDirectInputDeviceVtbl IDirectInputDeviceAVtbl
766 #if !defined(__cplusplus) || defined(CINTERFACE)
767 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
768 #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
769 #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
770 #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
771 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
772 #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
773 #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
774 #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
775 #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
776 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
777 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
778 #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
779 #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
780 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
781 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
782 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
783 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
784 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
786 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
787 #define IDirectInputDevice_AddRef(p) (p)->AddRef()
788 #define IDirectInputDevice_Release(p) (p)->Release()
789 #define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a)
790 #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
791 #define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b)
792 #define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b)
793 #define IDirectInputDevice_Acquire(p) (p)->Acquire()
794 #define IDirectInputDevice_Unacquire(p) (p)->Unacquire()
795 #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
796 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
797 #define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a)
798 #define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a)
799 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
800 #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
801 #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
802 #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
803 #define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
809 #if(DIRECTINPUT_VERSION >= 0x0500)
811 #define DISFFC_RESET 0x00000001
812 #define DISFFC_STOPALL 0x00000002
813 #define DISFFC_PAUSE 0x00000004
814 #define DISFFC_CONTINUE 0x00000008
815 #define DISFFC_SETACTUATORSON 0x00000010
816 #define DISFFC_SETACTUATORSOFF 0x00000020
818 #define DIGFFS_EMPTY 0x00000001
819 #define DIGFFS_STOPPED 0x00000002
820 #define DIGFFS_PAUSED 0x00000004
821 #define DIGFFS_ACTUATORSON 0x00000010
822 #define DIGFFS_ACTUATORSOFF 0x00000020
823 #define DIGFFS_POWERON 0x00000040
824 #define DIGFFS_POWEROFF 0x00000080
825 #define DIGFFS_SAFETYSWITCHON 0x00000100
826 #define DIGFFS_SAFETYSWITCHOFF 0x00000200
827 #define DIGFFS_USERFFSWITCHON 0x00000400
828 #define DIGFFS_USERFFSWITCHOFF 0x00000800
829 #define DIGFFS_DEVICELOST 0x80000000
863 #define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKW
865 #define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKA
870 #define INTERFACE IDirectInputDevice2W
875 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
876 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
877 STDMETHOD_(ULONG,Release)(THIS) PURE;
880 STDMETHOD(GetCapabilities)(THIS_
LPDIDEVCAPS) PURE;
881 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,
LPVOID,
DWORD) PURE;
884 STDMETHOD(Acquire)(THIS) PURE;
885 STDMETHOD(Unacquire)(THIS) PURE;
886 STDMETHOD(GetDeviceState)(THIS_
DWORD,
LPVOID) PURE;
889 STDMETHOD(SetEventNotification)(THIS_
HANDLE) PURE;
890 STDMETHOD(SetCooperativeLevel)(THIS_
HWND,
DWORD) PURE;
893 STDMETHOD(RunControlPanel)(THIS_
HWND,
DWORD) PURE;
897 STDMETHOD(CreateEffect)(THIS_ REFGUID,
LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
898 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,
LPVOID,
DWORD) PURE;
900 STDMETHOD(GetForceFeedbackState)(THIS_
LPDWORD) PURE;
901 STDMETHOD(SendForceFeedbackCommand)(THIS_
DWORD) PURE;
902 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,
LPVOID,
DWORD) PURE;
904 STDMETHOD(Poll)(THIS) PURE;
911 #define INTERFACE IDirectInputDevice2A
916 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
917 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
918 STDMETHOD_(ULONG,Release)(THIS) PURE;
921 STDMETHOD(GetCapabilities)(THIS_
LPDIDEVCAPS) PURE;
922 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,
LPVOID,
DWORD) PURE;
925 STDMETHOD(Acquire)(THIS) PURE;
926 STDMETHOD(Unacquire)(THIS) PURE;
927 STDMETHOD(GetDeviceState)(THIS_
DWORD,
LPVOID) PURE;
930 STDMETHOD(SetEventNotification)(THIS_
HANDLE) PURE;
931 STDMETHOD(SetCooperativeLevel)(THIS_
HWND,
DWORD) PURE;
934 STDMETHOD(RunControlPanel)(THIS_
HWND,
DWORD) PURE;
938 STDMETHOD(CreateEffect)(THIS_ REFGUID,
LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
939 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,
LPVOID,
DWORD) PURE;
941 STDMETHOD(GetForceFeedbackState)(THIS_
LPDWORD) PURE;
942 STDMETHOD(SendForceFeedbackCommand)(THIS_
DWORD) PURE;
943 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,
LPVOID,
DWORD) PURE;
945 STDMETHOD(Poll)(THIS) PURE;
952 #define IID_IDirectInputDevice2 IID_IDirectInputDevice2W
953 #define IDirectInputDevice2 IDirectInputDevice2W
954 #define IDirectInputDevice2Vtbl IDirectInputDevice2WVtbl
956 #define IID_IDirectInputDevice2 IID_IDirectInputDevice2A
957 #define IDirectInputDevice2 IDirectInputDevice2A
958 #define IDirectInputDevice2Vtbl IDirectInputDevice2AVtbl
962 #if !defined(__cplusplus) || defined(CINTERFACE)
963 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
964 #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
965 #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
966 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
967 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
968 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
969 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
970 #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
971 #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
972 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
973 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
974 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
975 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
976 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
977 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
978 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
979 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
980 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
981 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
982 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
983 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
984 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
985 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
986 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
987 #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
988 #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
989 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
991 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
992 #define IDirectInputDevice2_AddRef(p) (p)->AddRef()
993 #define IDirectInputDevice2_Release(p) (p)->Release()
994 #define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a)
995 #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
996 #define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b)
997 #define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b)
998 #define IDirectInputDevice2_Acquire(p) (p)->Acquire()
999 #define IDirectInputDevice2_Unacquire(p) (p)->Unacquire()
1000 #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
1001 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
1002 #define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a)
1003 #define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a)
1004 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
1005 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
1006 #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
1007 #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1008 #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1009 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
1010 #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
1011 #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
1012 #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
1013 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
1014 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
1015 #define IDirectInputDevice2_Escape(p,a) (p)->Escape(a)
1016 #define IDirectInputDevice2_Poll(p) (p)->Poll()
1017 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
1030 #ifndef DIJ_RINGZERO
1039 #define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
1040 #define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
1041 #define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
1042 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
1043 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
1044 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
1045 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
1055 #ifndef DIJ_RINGZERO
1063 #define DIK_ESCAPE 0x01
1074 #define DIK_MINUS 0x0C
1075 #define DIK_EQUALS 0x0D
1076 #define DIK_BACK 0x0E
1077 #define DIK_TAB 0x0F
1088 #define DIK_LBRACKET 0x1A
1089 #define DIK_RBRACKET 0x1B
1090 #define DIK_RETURN 0x1C
1091 #define DIK_LCONTROL 0x1D
1101 #define DIK_SEMICOLON 0x27
1102 #define DIK_APOSTROPHE 0x28
1103 #define DIK_GRAVE 0x29
1104 #define DIK_LSHIFT 0x2A
1105 #define DIK_BACKSLASH 0x2B
1113 #define DIK_COMMA 0x33
1114 #define DIK_PERIOD 0x34
1115 #define DIK_SLASH 0x35
1116 #define DIK_RSHIFT 0x36
1117 #define DIK_MULTIPLY 0x37
1118 #define DIK_LMENU 0x38
1119 #define DIK_SPACE 0x39
1120 #define DIK_CAPITAL 0x3A
1130 #define DIK_F10 0x44
1131 #define DIK_NUMLOCK 0x45
1132 #define DIK_SCROLL 0x46
1133 #define DIK_NUMPAD7 0x47
1134 #define DIK_NUMPAD8 0x48
1135 #define DIK_NUMPAD9 0x49
1136 #define DIK_SUBTRACT 0x4A
1137 #define DIK_NUMPAD4 0x4B
1138 #define DIK_NUMPAD5 0x4C
1139 #define DIK_NUMPAD6 0x4D
1140 #define DIK_ADD 0x4E
1141 #define DIK_NUMPAD1 0x4F
1142 #define DIK_NUMPAD2 0x50
1143 #define DIK_NUMPAD3 0x51
1144 #define DIK_NUMPAD0 0x52
1145 #define DIK_DECIMAL 0x53
1146 #define DIK_F11 0x57
1147 #define DIK_F12 0x58
1149 #define DIK_F13 0x64
1150 #define DIK_F14 0x65
1151 #define DIK_F15 0x66
1153 #define DIK_KANA 0x70
1154 #define DIK_CONVERT 0x79
1155 #define DIK_NOCONVERT 0x7B
1156 #define DIK_YEN 0x7D
1157 #define DIK_NUMPADEQUALS 0x8D
1158 #define DIK_CIRCUMFLEX 0x90
1160 #define DIK_COLON 0x92
1161 #define DIK_UNDERLINE 0x93
1162 #define DIK_KANJI 0x94
1163 #define DIK_STOP 0x95
1165 #define DIK_UNLABELED 0x97
1166 #define DIK_NUMPADENTER 0x9C
1167 #define DIK_RCONTROL 0x9D
1168 #define DIK_NUMPADCOMMA 0xB3
1169 #define DIK_DIVIDE 0xB5
1170 #define DIK_SYSRQ 0xB7
1171 #define DIK_RMENU 0xB8
1172 #define DIK_HOME 0xC7
1174 #define DIK_PRIOR 0xC9
1175 #define DIK_LEFT 0xCB
1176 #define DIK_RIGHT 0xCD
1177 #define DIK_END 0xCF
1178 #define DIK_DOWN 0xD0
1179 #define DIK_NEXT 0xD1
1180 #define DIK_INSERT 0xD2
1181 #define DIK_DELETE 0xD3
1182 #define DIK_LWIN 0xDB
1183 #define DIK_RWIN 0xDC
1184 #define DIK_APPS 0xDD
1189 #define DIK_BACKSPACE DIK_BACK
1190 #define DIK_NUMPADSTAR DIK_MULTIPLY
1191 #define DIK_LALT DIK_LMENU
1192 #define DIK_CAPSLOCK DIK_CAPITAL
1193 #define DIK_NUMPADMINUS DIK_SUBTRACT
1194 #define DIK_NUMPADPLUS DIK_ADD
1195 #define DIK_NUMPADPERIOD DIK_DECIMAL
1196 #define DIK_NUMPADSLASH DIK_DIVIDE
1197 #define DIK_RALT DIK_RMENU
1198 #define DIK_UPARROW DIK_UP
1199 #define DIK_PGUP DIK_PRIOR
1200 #define DIK_LEFTARROW DIK_LEFT
1201 #define DIK_RIGHTARROW DIK_RIGHT
1202 #define DIK_DOWNARROW DIK_DOWN
1203 #define DIK_PGDN DIK_NEXT
1213 #ifndef DIJ_RINGZERO
1260 #define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
1261 #define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
1262 #define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
1263 #define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
1264 #define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
1265 #define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
1266 #define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
1268 #define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
1269 (n) * sizeof(DWORD))
1270 #define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
1271 #define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
1272 #define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
1273 #define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
1274 #define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
1275 #define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
1276 #define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
1277 #define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
1278 #define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
1279 #define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
1280 #define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
1281 #define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
1282 #define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
1283 #define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
1284 #define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
1285 #define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
1286 #define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
1287 #define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
1288 #define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
1289 #define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
1290 #define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
1291 #define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
1292 #define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
1293 #define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
1294 #define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
1295 #define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
1296 #define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
1297 #define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
1298 #define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
1299 #define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
1300 #define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
1301 #define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
1302 #define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
1313 #ifndef DIJ_RINGZERO
1315 #define DIENUM_STOP 0
1316 #define DIENUM_CONTINUE 1
1321 #define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKW
1323 #define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKA
1326 #define DIEDFL_ALLDEVICES 0x00000000
1327 #define DIEDFL_ATTACHEDONLY 0x00000001
1328 #if(DIRECTINPUT_VERSION >= 0x0500)
1329 #define DIEDFL_FORCEFEEDBACK 0x00000100
1333 #define INTERFACE IDirectInputW
1338 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
1339 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1340 STDMETHOD_(ULONG,Release)(THIS) PURE;
1343 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
1344 STDMETHOD(EnumDevices)(THIS_
DWORD,LPDIENUMDEVICESCALLBACKW,
LPVOID,
DWORD) PURE;
1345 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
1346 STDMETHOD(RunControlPanel)(THIS_
HWND,
DWORD) PURE;
1353 #define INTERFACE IDirectInputA
1358 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
1359 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1360 STDMETHOD_(ULONG,Release)(THIS) PURE;
1363 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
1364 STDMETHOD(EnumDevices)(THIS_
DWORD,LPDIENUMDEVICESCALLBACKA,
LPVOID,
DWORD) PURE;
1365 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
1366 STDMETHOD(RunControlPanel)(THIS_
HWND,
DWORD) PURE;
1373 #define IID_IDirectInput IID_IDirectInputW
1374 #define IDirectInput IDirectInputW
1375 #define IDirectInputVtbl IDirectInputWVtbl
1377 #define IID_IDirectInput IID_IDirectInputA
1378 #define IDirectInput IDirectInputA
1379 #define IDirectInputVtbl IDirectInputAVtbl
1383 #if !defined(__cplusplus) || defined(CINTERFACE)
1384 #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1385 #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
1386 #define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
1387 #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1388 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1389 #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1390 #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1391 #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1393 #define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1394 #define IDirectInput_AddRef(p) (p)->AddRef()
1395 #define IDirectInput_Release(p) (p)->Release()
1396 #define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
1397 #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
1398 #define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
1399 #define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1400 #define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b)
1404 #define INTERFACE IDirectInput2W
1409 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
1410 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1411 STDMETHOD_(ULONG,Release)(THIS) PURE;
1414 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
1415 STDMETHOD(EnumDevices)(THIS_
DWORD,LPDIENUMDEVICESCALLBACKW,
LPVOID,
DWORD) PURE;
1416 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
1417 STDMETHOD(RunControlPanel)(THIS_
HWND,
DWORD) PURE;
1421 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
1427 #define INTERFACE IDirectInput2A
1432 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
1433 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1434 STDMETHOD_(ULONG,Release)(THIS) PURE;
1437 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
1438 STDMETHOD(EnumDevices)(THIS_
DWORD,LPDIENUMDEVICESCALLBACKA,
LPVOID,
DWORD) PURE;
1439 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
1440 STDMETHOD(RunControlPanel)(THIS_
HWND,
DWORD) PURE;
1444 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
1450 #define IID_IDirectInput2 IID_IDirectInput2W
1451 #define IDirectInput2 IDirectInput2W
1452 #define IDirectInput2Vtbl IDirectInput2WVtbl
1454 #define IID_IDirectInput2 IID_IDirectInput2A
1455 #define IDirectInput2 IDirectInput2A
1456 #define IDirectInput2Vtbl IDirectInput2AVtbl
1460 #if !defined(__cplusplus) || defined(CINTERFACE)
1461 #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1462 #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
1463 #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
1464 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1465 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1466 #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1467 #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1468 #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1469 #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1471 #define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1472 #define IDirectInput2_AddRef(p) (p)->AddRef()
1473 #define IDirectInput2_Release(p) (p)->Release()
1474 #define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
1475 #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
1476 #define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
1477 #define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1478 #define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b)
1479 #define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
1485 #define DirectInputCreate DirectInputCreateW
1487 #define DirectInputCreate DirectInputCreateA
1507 #define DI_NOTATTACHED S_FALSE
1512 #define DI_BUFFEROVERFLOW S_FALSE
1517 #define DI_PROPNOEFFECT S_FALSE
1522 #define DI_NOEFFECT S_FALSE
1529 #define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
1537 #define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
1544 #define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
1551 #define DI_TRUNCATED ((HRESULT)0x00000008L)
1556 #define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
1561 #define DIERR_OLDDIRECTINPUTVERSION \
1562 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
1568 #define DIERR_BETADIRECTINPUTVERSION \
1569 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
1575 #define DIERR_BADDRIVERVER \
1576 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
1581 #define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
1586 #define DIERR_NOTFOUND \
1587 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
1592 #define DIERR_OBJECTNOTFOUND \
1593 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
1600 #define DIERR_INVALIDPARAM E_INVALIDARG
1605 #define DIERR_NOINTERFACE E_NOINTERFACE
1610 #define DIERR_GENERIC E_FAIL
1616 #define DIERR_OUTOFMEMORY E_OUTOFMEMORY
1621 #define DIERR_UNSUPPORTED E_NOTIMPL
1626 #define DIERR_NOTINITIALIZED \
1627 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
1632 #define DIERR_ALREADYINITIALIZED \
1633 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
1638 #define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
1644 #define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
1649 #define DIERR_INPUTLOST \
1650 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
1655 #define DIERR_ACQUIRED \
1656 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
1661 #define DIERR_NOTACQUIRED \
1662 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
1667 #define DIERR_READONLY E_ACCESSDENIED
1672 #define DIERR_HANDLEEXISTS E_ACCESSDENIED
1678 #define E_PENDING 0x80070007L
1686 #define DIERR_INSUFFICIENTPRIVS 0x80040200L
1691 #define DIERR_DEVICEFULL 0x80040201L
1696 #define DIERR_MOREDATA 0x80040202L
1701 #define DIERR_NOTDOWNLOADED 0x80040203L
1707 #define DIERR_HASEFFECTS 0x80040204L
1713 #define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
1720 #define DIERR_INCOMPLETEEFFECT 0x80040206L
1726 #define DIERR_NOTBUFFERED 0x80040207L
1733 #define DIERR_EFFECTPLAYING 0x80040208L
1748 #ifdef _INC_MMSYSTEM
1751 #ifndef __VJOYDX_INCLUDED__
1752 #define __VJOYDX_INCLUDED__
1763 #define JOY_PASSDRIVERDATA 0x10000000l
1775 #define JOY_HWS_ISHEADTRACKER 0x02000000l
1781 #define JOY_HWS_ISGAMEPORTDRIVER 0x04000000l
1787 #define JOY_HWS_ISANALOGPORTDRIVER 0x08000000l
1794 #define JOY_HWS_AUTOLOAD 0x10000000l
1800 #define JOY_HWS_NODEVNODE 0x20000000l
1806 #define JOY_HWS_ISGAMEPORTEMULATOR 0x40000000l
1813 #define JOY_US_VOLATILE 0x00000008L
1831 #ifndef DIJ_RINGZERO
1836 #ifndef __VJOYDXD_INCLUDED__
1837 #define __VJOYDXD_INCLUDED__
1842 #define JOY_OEMPOLL_PASSDRIVERDATA 7
DWORD dwFFForceResolution
DWORD dwFFForceResolution
DWORD cbTypeSpecificParams
DWORD dwNegativeSaturation
DWORD dwFFMinTimeResolution
WCHAR tszInstanceName[MAX_PATH]
CHAR tszInstanceName[MAX_PATH]
LONG lPositiveCoefficient
CHAR tszInstanceName[MAX_PATH]
LPVOID lpvTypeSpecificParams
CHAR tszProductName[MAX_PATH]
LONG lNegativeCoefficient
WCHAR tszProductName[MAX_PATH]
CHAR tszProductName[MAX_PATH]
DWORD dwPositiveSaturation
WCHAR tszProductName[MAX_PATH]
DWORD dwTriggerRepeatInterval
LPDIOBJECTDATAFORMAT rgodf
WCHAR tszInstanceName[MAX_PATH]