10#ifndef __DINPUT_INCLUDED__
11#define __DINPUT_INCLUDED__
16#define COM_NO_WINDOWS_H
26#ifndef DIRECTINPUT_VERSION
27#define DIRECTINPUT_VERSION 0x0500
37DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
38DEFINE_GUID(CLSID_DirectInputDevice,0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
46DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
47DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
48DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
49DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
51DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
52DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
53DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
54DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
56DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
64DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
65DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
66DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
67DEFINE_GUID(GUID_RxAxis, 0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
68DEFINE_GUID(GUID_RyAxis, 0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
69DEFINE_GUID(GUID_RzAxis, 0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
70DEFINE_GUID(GUID_Slider, 0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
72DEFINE_GUID(GUID_Button, 0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
73DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
75DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
77DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
85DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
86DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
87DEFINE_GUID(GUID_Joystick ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
95DEFINE_GUID(GUID_ConstantForce,0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
96DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
97DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
98DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
99DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
100DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
101DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
102DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
103DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
104DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
105DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
106DEFINE_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;
259 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD,REFGUID) 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
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;
720 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD,REFGUID) 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;
750 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD,REFGUID) 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;
894 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD,REFGUID) 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;
935 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD,REFGUID) 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)
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)
1064#define DIK_ESCAPE 0x01
1075#define DIK_MINUS 0x0C
1076#define DIK_EQUALS 0x0D
1077#define DIK_BACK 0x0E
1089#define DIK_LBRACKET 0x1A
1090#define DIK_RBRACKET 0x1B
1091#define DIK_RETURN 0x1C
1092#define DIK_LCONTROL 0x1D
1102#define DIK_SEMICOLON 0x27
1103#define DIK_APOSTROPHE 0x28
1104#define DIK_GRAVE 0x29
1105#define DIK_LSHIFT 0x2A
1106#define DIK_BACKSLASH 0x2B
1114#define DIK_COMMA 0x33
1115#define DIK_PERIOD 0x34
1116#define DIK_SLASH 0x35
1117#define DIK_RSHIFT 0x36
1118#define DIK_MULTIPLY 0x37
1119#define DIK_LMENU 0x38
1120#define DIK_SPACE 0x39
1121#define DIK_CAPITAL 0x3A
1132#define DIK_NUMLOCK 0x45
1133#define DIK_SCROLL 0x46
1134#define DIK_NUMPAD7 0x47
1135#define DIK_NUMPAD8 0x48
1136#define DIK_NUMPAD9 0x49
1137#define DIK_SUBTRACT 0x4A
1138#define DIK_NUMPAD4 0x4B
1139#define DIK_NUMPAD5 0x4C
1140#define DIK_NUMPAD6 0x4D
1142#define DIK_NUMPAD1 0x4F
1143#define DIK_NUMPAD2 0x50
1144#define DIK_NUMPAD3 0x51
1145#define DIK_NUMPAD0 0x52
1146#define DIK_DECIMAL 0x53
1154#define DIK_KANA 0x70
1155#define DIK_CONVERT 0x79
1156#define DIK_NOCONVERT 0x7B
1158#define DIK_NUMPADEQUALS 0x8D
1159#define DIK_CIRCUMFLEX 0x90
1161#define DIK_COLON 0x92
1162#define DIK_UNDERLINE 0x93
1163#define DIK_KANJI 0x94
1164#define DIK_STOP 0x95
1166#define DIK_UNLABELED 0x97
1167#define DIK_NUMPADENTER 0x9C
1168#define DIK_RCONTROL 0x9D
1169#define DIK_NUMPADCOMMA 0xB3
1170#define DIK_DIVIDE 0xB5
1171#define DIK_SYSRQ 0xB7
1172#define DIK_RMENU 0xB8
1173#define DIK_HOME 0xC7
1175#define DIK_PRIOR 0xC9
1176#define DIK_LEFT 0xCB
1177#define DIK_RIGHT 0xCD
1179#define DIK_DOWN 0xD0
1180#define DIK_NEXT 0xD1
1181#define DIK_INSERT 0xD2
1182#define DIK_DELETE 0xD3
1183#define DIK_LWIN 0xDB
1184#define DIK_RWIN 0xDC
1185#define DIK_APPS 0xDD
1190#define DIK_BACKSPACE DIK_BACK
1191#define DIK_NUMPADSTAR DIK_MULTIPLY
1192#define DIK_LALT DIK_LMENU
1193#define DIK_CAPSLOCK DIK_CAPITAL
1194#define DIK_NUMPADMINUS DIK_SUBTRACT
1195#define DIK_NUMPADPLUS DIK_ADD
1196#define DIK_NUMPADPERIOD DIK_DECIMAL
1197#define DIK_NUMPADSLASH DIK_DIVIDE
1198#define DIK_RALT DIK_RMENU
1199#define DIK_UPARROW DIK_UP
1200#define DIK_PGUP DIK_PRIOR
1201#define DIK_LEFTARROW DIK_LEFT
1202#define DIK_RIGHTARROW DIK_RIGHT
1203#define DIK_DOWNARROW DIK_DOWN
1204#define DIK_PGDN DIK_NEXT
1261#define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX)
1262#define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY)
1263#define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ)
1264#define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx)
1265#define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy)
1266#define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz)
1267#define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
1269#define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
1270 (n) * sizeof(DWORD))
1271#define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
1272#define DIJOFS_BUTTON0 DIJOFS_BUTTON(0)
1273#define DIJOFS_BUTTON1 DIJOFS_BUTTON(1)
1274#define DIJOFS_BUTTON2 DIJOFS_BUTTON(2)
1275#define DIJOFS_BUTTON3 DIJOFS_BUTTON(3)
1276#define DIJOFS_BUTTON4 DIJOFS_BUTTON(4)
1277#define DIJOFS_BUTTON5 DIJOFS_BUTTON(5)
1278#define DIJOFS_BUTTON6 DIJOFS_BUTTON(6)
1279#define DIJOFS_BUTTON7 DIJOFS_BUTTON(7)
1280#define DIJOFS_BUTTON8 DIJOFS_BUTTON(8)
1281#define DIJOFS_BUTTON9 DIJOFS_BUTTON(9)
1282#define DIJOFS_BUTTON10 DIJOFS_BUTTON(10)
1283#define DIJOFS_BUTTON11 DIJOFS_BUTTON(11)
1284#define DIJOFS_BUTTON12 DIJOFS_BUTTON(12)
1285#define DIJOFS_BUTTON13 DIJOFS_BUTTON(13)
1286#define DIJOFS_BUTTON14 DIJOFS_BUTTON(14)
1287#define DIJOFS_BUTTON15 DIJOFS_BUTTON(15)
1288#define DIJOFS_BUTTON16 DIJOFS_BUTTON(16)
1289#define DIJOFS_BUTTON17 DIJOFS_BUTTON(17)
1290#define DIJOFS_BUTTON18 DIJOFS_BUTTON(18)
1291#define DIJOFS_BUTTON19 DIJOFS_BUTTON(19)
1292#define DIJOFS_BUTTON20 DIJOFS_BUTTON(20)
1293#define DIJOFS_BUTTON21 DIJOFS_BUTTON(21)
1294#define DIJOFS_BUTTON22 DIJOFS_BUTTON(22)
1295#define DIJOFS_BUTTON23 DIJOFS_BUTTON(23)
1296#define DIJOFS_BUTTON24 DIJOFS_BUTTON(24)
1297#define DIJOFS_BUTTON25 DIJOFS_BUTTON(25)
1298#define DIJOFS_BUTTON26 DIJOFS_BUTTON(26)
1299#define DIJOFS_BUTTON27 DIJOFS_BUTTON(27)
1300#define DIJOFS_BUTTON28 DIJOFS_BUTTON(28)
1301#define DIJOFS_BUTTON29 DIJOFS_BUTTON(29)
1302#define DIJOFS_BUTTON30 DIJOFS_BUTTON(30)
1303#define DIJOFS_BUTTON31 DIJOFS_BUTTON(31)
1316#define DIENUM_STOP 0
1317#define DIENUM_CONTINUE 1
1322#define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKW
1324#define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKA
1327#define DIEDFL_ALLDEVICES 0x00000000
1328#define DIEDFL_ATTACHEDONLY 0x00000001
1329#if(DIRECTINPUT_VERSION >= 0x0500)
1330#define DIEDFL_FORCEFEEDBACK 0x00000100
1334#define INTERFACE IDirectInputW
1339 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
1340 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1341 STDMETHOD_(ULONG,Release)(THIS) PURE;
1345 STDMETHOD(EnumDevices)(THIS_
DWORD,LPDIENUMDEVICESCALLBACKW,
LPVOID,
DWORD) PURE;
1346 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
1347 STDMETHOD(RunControlPanel)(THIS_ HWND,
DWORD) PURE;
1348 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD) PURE;
1354#define INTERFACE IDirectInputA
1359 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
1360 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1361 STDMETHOD_(ULONG,Release)(THIS) PURE;
1365 STDMETHOD(EnumDevices)(THIS_
DWORD,LPDIENUMDEVICESCALLBACKA,
LPVOID,
DWORD) PURE;
1366 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
1367 STDMETHOD(RunControlPanel)(THIS_ HWND,
DWORD) PURE;
1368 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD) PURE;
1374#define IID_IDirectInput IID_IDirectInputW
1375#define IDirectInput IDirectInputW
1376#define IDirectInputVtbl IDirectInputWVtbl
1378#define IID_IDirectInput IID_IDirectInputA
1379#define IDirectInput IDirectInputA
1380#define IDirectInputVtbl IDirectInputAVtbl
1384#if !defined(__cplusplus) || defined(CINTERFACE)
1385#define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1386#define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
1387#define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
1388#define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1389#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1390#define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1391#define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1392#define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1394#define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1395#define IDirectInput_AddRef(p) (p)->AddRef()
1396#define IDirectInput_Release(p) (p)->Release()
1397#define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
1398#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
1399#define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
1400#define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1401#define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b)
1405#define INTERFACE IDirectInput2W
1410 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
1411 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1412 STDMETHOD_(ULONG,Release)(THIS) PURE;
1416 STDMETHOD(EnumDevices)(THIS_
DWORD,LPDIENUMDEVICESCALLBACKW,
LPVOID,
DWORD) PURE;
1417 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
1418 STDMETHOD(RunControlPanel)(THIS_ HWND,
DWORD) PURE;
1419 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD) PURE;
1422 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
1428#define INTERFACE IDirectInput2A
1433 STDMETHOD(QueryInterface)(THIS_ REFIID riid,
LPVOID * ppvObj) PURE;
1434 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1435 STDMETHOD_(ULONG,Release)(THIS) PURE;
1439 STDMETHOD(EnumDevices)(THIS_
DWORD,LPDIENUMDEVICESCALLBACKA,
LPVOID,
DWORD) PURE;
1440 STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
1441 STDMETHOD(RunControlPanel)(THIS_ HWND,
DWORD) PURE;
1442 STDMETHOD(Initialize)(THIS_ HINSTANCE,
DWORD) PURE;
1445 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
1451#define IID_IDirectInput2 IID_IDirectInput2W
1452#define IDirectInput2 IDirectInput2W
1453#define IDirectInput2Vtbl IDirectInput2WVtbl
1455#define IID_IDirectInput2 IID_IDirectInput2A
1456#define IDirectInput2 IDirectInput2A
1457#define IDirectInput2Vtbl IDirectInput2AVtbl
1461#if !defined(__cplusplus) || defined(CINTERFACE)
1462#define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1463#define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
1464#define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
1465#define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
1466#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1467#define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
1468#define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1469#define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
1470#define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
1472#define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1473#define IDirectInput2_AddRef(p) (p)->AddRef()
1474#define IDirectInput2_Release(p) (p)->Release()
1475#define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
1476#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
1477#define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
1478#define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
1479#define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b)
1480#define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
1486#define DirectInputCreate DirectInputCreateW
1488#define DirectInputCreate DirectInputCreateA
1508#define DI_NOTATTACHED S_FALSE
1513#define DI_BUFFEROVERFLOW S_FALSE
1518#define DI_PROPNOEFFECT S_FALSE
1523#define DI_NOEFFECT S_FALSE
1530#define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
1538#define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
1545#define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
1552#define DI_TRUNCATED ((HRESULT)0x00000008L)
1557#define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
1562#define DIERR_OLDDIRECTINPUTVERSION \
1563 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
1569#define DIERR_BETADIRECTINPUTVERSION \
1570 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
1576#define DIERR_BADDRIVERVER \
1577 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
1582#define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
1587#define DIERR_NOTFOUND \
1588 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
1593#define DIERR_OBJECTNOTFOUND \
1594 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
1601#define DIERR_INVALIDPARAM E_INVALIDARG
1606#define DIERR_NOINTERFACE E_NOINTERFACE
1611#define DIERR_GENERIC E_FAIL
1617#define DIERR_OUTOFMEMORY E_OUTOFMEMORY
1622#define DIERR_UNSUPPORTED E_NOTIMPL
1627#define DIERR_NOTINITIALIZED \
1628 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
1633#define DIERR_ALREADYINITIALIZED \
1634 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
1639#define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
1645#define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
1650#define DIERR_INPUTLOST \
1651 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
1656#define DIERR_ACQUIRED \
1657 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
1662#define DIERR_NOTACQUIRED \
1663 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
1668#define DIERR_READONLY E_ACCESSDENIED
1673#define DIERR_HANDLEEXISTS E_ACCESSDENIED
1679#define E_PENDING 0x80070007L
1687#define DIERR_INSUFFICIENTPRIVS 0x80040200L
1692#define DIERR_DEVICEFULL 0x80040201L
1697#define DIERR_MOREDATA 0x80040202L
1702#define DIERR_NOTDOWNLOADED 0x80040203L
1708#define DIERR_HASEFFECTS 0x80040204L
1714#define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
1721#define DIERR_INCOMPLETEEFFECT 0x80040206L
1727#define DIERR_NOTBUFFERED 0x80040207L
1734#define DIERR_EFFECTPLAYING 0x80040208L
1752#ifndef __VJOYDX_INCLUDED__
1753#define __VJOYDX_INCLUDED__
1764#define JOY_PASSDRIVERDATA 0x10000000l
1771WINMMAPI MMRESULT WINAPI joyConfigChanged(
DWORD dwFlags );
1776#define JOY_HWS_ISHEADTRACKER 0x02000000l
1782#define JOY_HWS_ISGAMEPORTDRIVER 0x04000000l
1788#define JOY_HWS_ISANALOGPORTDRIVER 0x08000000l
1795#define JOY_HWS_AUTOLOAD 0x10000000l
1801#define JOY_HWS_NODEVNODE 0x20000000l
1807#define JOY_HWS_ISGAMEPORTEMULATOR 0x40000000l
1814#define JOY_US_VOLATILE 0x00000008L
1837#ifndef __VJOYDXD_INCLUDED__
1838#define __VJOYDXD_INCLUDED__
1843#define JOY_OEMPOLL_PASSDRIVERDATA 7
LPSTR LPSTR LPVOID
Definition: d3dcaps.h:213
#define IUnknown
Definition: ddraw.h:28
typedef DWORD(FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper
long HRESULT
Definition: ddraw.h:115
LPDWORD DWORD dwFlags
Definition: dplay.h:417
LONG lOffset
Definition: dinput.h:167
DWORD dwPositiveSaturation
Definition: dinput.h:170
DWORD dwNegativeSaturation
Definition: dinput.h:171
LONG lNegativeCoefficient
Definition: dinput.h:169
LONG lPositiveCoefficient
Definition: dinput.h:168
LONG lDeadBand
Definition: dinput.h:172
LONG lMagnitude
Definition: dinput.h:148
DWORD dwSamplePeriod
Definition: dinput.h:178
LPLONG rglForceData
Definition: dinput.h:180
DWORD cChannels
Definition: dinput.h:177
DWORD cSamples
Definition: dinput.h:179
DWORD dwButtons
Definition: dinput.h:358
DWORD dwDevType
Definition: dinput.h:356
DWORD dwAxes
Definition: dinput.h:357
DWORD dwSize
Definition: dinput.h:354
DWORD dwFlags
Definition: dinput.h:355
DWORD dwPOVs
Definition: dinput.h:359
DWORD dwHardwareRevision
Definition: dinput.h:374
DWORD dwAxes
Definition: dinput.h:367
DWORD dwFFSamplePeriod
Definition: dinput.h:371
DWORD dwButtons
Definition: dinput.h:368
DWORD dwPOVs
Definition: dinput.h:369
DWORD dwSize
Definition: dinput.h:364
DWORD dwFlags
Definition: dinput.h:365
DWORD dwFFDriverVersion
Definition: dinput.h:375
DWORD dwFirmwareRevision
Definition: dinput.h:373
DWORD dwDevType
Definition: dinput.h:366
DWORD dwFFMinTimeResolution
Definition: dinput.h:372
WORD wUsagePage
Definition: dinput.h:667
WORD wUsage
Definition: dinput.h:668
GUID guidProduct
Definition: dinput.h:661
GUID guidFFDriver
Definition: dinput.h:666
GUID guidInstance
Definition: dinput.h:660
CHAR tszInstanceName[MAX_PATH]
Definition: dinput.h:663
CHAR tszProductName[MAX_PATH]
Definition: dinput.h:664
DWORD dwDevType
Definition: dinput.h:662
DWORD dwSize
Definition: dinput.h:659
WORD wUsagePage
Definition: dinput.h:680
DWORD dwDevType
Definition: dinput.h:675
WCHAR tszProductName[MAX_PATH]
Definition: dinput.h:677
GUID guidFFDriver
Definition: dinput.h:679
DWORD dwSize
Definition: dinput.h:672
GUID guidProduct
Definition: dinput.h:674
WCHAR tszInstanceName[MAX_PATH]
Definition: dinput.h:676
WORD wUsage
Definition: dinput.h:681
GUID guidInstance
Definition: dinput.h:673
GUID guidProduct
Definition: dinput.h:633
CHAR tszInstanceName[MAX_PATH]
Definition: dinput.h:635
DWORD dwSize
Definition: dinput.h:631
GUID guidInstance
Definition: dinput.h:632
CHAR tszProductName[MAX_PATH]
Definition: dinput.h:636
DWORD dwDevType
Definition: dinput.h:634
GUID guidInstance
Definition: dinput.h:640
GUID guidProduct
Definition: dinput.h:641
WCHAR tszInstanceName[MAX_PATH]
Definition: dinput.h:643
DWORD dwSize
Definition: dinput.h:639
WCHAR tszProductName[MAX_PATH]
Definition: dinput.h:644
DWORD dwDevType
Definition: dinput.h:642
DWORD dwSequence
Definition: dinput.h:614
DWORD dwTimeStamp
Definition: dinput.h:613
DWORD dwData
Definition: dinput.h:612
DWORD dwOfs
Definition: dinput.h:611
DWORD dwFFForceResolution
Definition: dinput.h:488
DWORD dwSize
Definition: dinput.h:480
WORD wExponent
Definition: dinput.h:494
DWORD dwOfs
Definition: dinput.h:482
DWORD dwFlags
Definition: dinput.h:484
WORD wUsagePage
Definition: dinput.h:491
DWORD dwFFMaxForce
Definition: dinput.h:487
WORD wReserved
Definition: dinput.h:495
GUID guidType
Definition: dinput.h:481
DWORD dwDimension
Definition: dinput.h:493
DWORD dwType
Definition: dinput.h:483
WORD wDesignatorIndex
Definition: dinput.h:490
WORD wUsage
Definition: dinput.h:492
CHAR tszName[MAX_PATH]
Definition: dinput.h:485
WORD wCollectionNumber
Definition: dinput.h:489
DWORD dwFFMaxForce
Definition: dinput.h:506
WORD wUsage
Definition: dinput.h:511
DWORD dwOfs
Definition: dinput.h:501
DWORD dwSize
Definition: dinput.h:499
DWORD dwFlags
Definition: dinput.h:503
GUID guidType
Definition: dinput.h:500
WORD wUsagePage
Definition: dinput.h:510
DWORD dwFFForceResolution
Definition: dinput.h:507
WCHAR tszName[MAX_PATH]
Definition: dinput.h:504
WORD wExponent
Definition: dinput.h:513
WORD wCollectionNumber
Definition: dinput.h:508
DWORD dwDimension
Definition: dinput.h:512
WORD wDesignatorIndex
Definition: dinput.h:509
WORD wReserved
Definition: dinput.h:514
DWORD dwType
Definition: dinput.h:502
DWORD dwType
Definition: dinput.h:455
DWORD dwFlags
Definition: dinput.h:456
GUID guidType
Definition: dinput.h:453
CHAR tszName[MAX_PATH]
Definition: dinput.h:457
DWORD dwSize
Definition: dinput.h:452
DWORD dwOfs
Definition: dinput.h:454
DWORD dwOfs
Definition: dinput.h:462
WCHAR tszName[MAX_PATH]
Definition: dinput.h:465
DWORD dwSize
Definition: dinput.h:460
DWORD dwType
Definition: dinput.h:463
GUID guidType
Definition: dinput.h:461
DWORD dwFlags
Definition: dinput.h:464
DWORD dwStaticParams
Definition: dinput.h:837
DWORD dwSize
Definition: dinput.h:834
GUID guid
Definition: dinput.h:835
DWORD dwEffType
Definition: dinput.h:836
DWORD dwDynamicParams
Definition: dinput.h:838
CHAR tszName[MAX_PATH]
Definition: dinput.h:839
GUID guid
Definition: dinput.h:843
DWORD dwDynamicParams
Definition: dinput.h:846
DWORD dwStaticParams
Definition: dinput.h:845
DWORD dwSize
Definition: dinput.h:842
WCHAR tszName[MAX_PATH]
Definition: dinput.h:847
DWORD dwEffType
Definition: dinput.h:844
DWORD cAxes
Definition: dinput.h:201
DWORD dwTriggerButton
Definition: dinput.h:199
LPDIENVELOPE lpEnvelope
Definition: dinput.h:204
DWORD dwDuration
Definition: dinput.h:196
DWORD dwGain
Definition: dinput.h:198
DWORD dwFlags
Definition: dinput.h:195
DWORD dwTriggerRepeatInterval
Definition: dinput.h:200
DWORD dwSize
Definition: dinput.h:194
LPVOID lpvTypeSpecificParams
Definition: dinput.h:206
LPLONG rglDirection
Definition: dinput.h:203
DWORD dwSamplePeriod
Definition: dinput.h:197
DWORD cbTypeSpecificParams
Definition: dinput.h:205
LPDWORD rgdwAxes
Definition: dinput.h:202
DWORD cbOutBuffer
Definition: dinput.h:243
LPVOID lpvOutBuffer
Definition: dinput.h:242
DWORD dwSize
Definition: dinput.h:238
DWORD cbInBuffer
Definition: dinput.h:241
LPVOID lpvInBuffer
Definition: dinput.h:240
DWORD dwCommand
Definition: dinput.h:239
DWORD dwAttackLevel
Definition: dinput.h:186
DWORD dwAttackTime
Definition: dinput.h:187
DWORD dwFadeLevel
Definition: dinput.h:188
DWORD dwFadeTime
Definition: dinput.h:189
DWORD dwSize
Definition: dinput.h:185
Definition: dinput.h:1228
LONG rglFSlider[2]
Definition: dinput.h:1258
LONG rglASlider[2]
Definition: dinput.h:1251
LONG lRy
Definition: dinput.h:1233
LONG lFRy
Definition: dinput.h:1256
LONG lVRx
Definition: dinput.h:1241
LONG lVX
Definition: dinput.h:1238
LONG lVRy
Definition: dinput.h:1242
LONG lRx
Definition: dinput.h:1232
LONG lFRx
Definition: dinput.h:1255
LONG lARy
Definition: dinput.h:1249
LONG lAX
Definition: dinput.h:1245
LONG lFRz
Definition: dinput.h:1257
LONG lAY
Definition: dinput.h:1246
LONG lZ
Definition: dinput.h:1231
LONG lVZ
Definition: dinput.h:1240
LONG lFY
Definition: dinput.h:1253
LONG lFX
Definition: dinput.h:1252
DWORD rgdwPOV[4]
Definition: dinput.h:1236
LONG lARz
Definition: dinput.h:1250
LONG lRz
Definition: dinput.h:1234
LONG lX
Definition: dinput.h:1229
LONG rglSlider[2]
Definition: dinput.h:1235
BYTE rgbButtons[128]
Definition: dinput.h:1237
LONG lY
Definition: dinput.h:1230
LONG lAZ
Definition: dinput.h:1247
LONG lVY
Definition: dinput.h:1239
LONG lARx
Definition: dinput.h:1248
LONG lVRz
Definition: dinput.h:1243
LONG rglVSlider[2]
Definition: dinput.h:1244
LONG lFZ
Definition: dinput.h:1254
Definition: dinput.h:1216
LONG lRy
Definition: dinput.h:1221
LONG lRz
Definition: dinput.h:1222
LONG lRx
Definition: dinput.h:1220
LONG lZ
Definition: dinput.h:1219
LONG lX
Definition: dinput.h:1217
BYTE rgbButtons[32]
Definition: dinput.h:1225
DWORD rgdwPOV[4]
Definition: dinput.h:1224
LONG rglSlider[2]
Definition: dinput.h:1223
LONG lY
Definition: dinput.h:1218
DWORD dwPeriod
Definition: dinput.h:162
LONG lOffset
Definition: dinput.h:160
DWORD dwMagnitude
Definition: dinput.h:159
DWORD dwPhase
Definition: dinput.h:161
DIPROPHEADER diph
Definition: dinput.h:560
DWORD dwData
Definition: dinput.h:561
LONG lMin
Definition: dinput.h:567
LONG lMax
Definition: dinput.h:568
DIPROPHEADER diph
Definition: dinput.h:566
LONG lEnd
Definition: dinput.h:154
LONG lStart
Definition: dinput.h:153
Definition: dinput.h:1032
BYTE rgbButtons[4]
Definition: dinput.h:1036
LONG lZ
Definition: dinput.h:1035
LONG lX
Definition: dinput.h:1033
LONG lY
Definition: dinput.h:1034