DirectX 5 Redocumentation
A redocumentation of DirectX 5, brought to you by a bunch of Infomaniacs.
dinput.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
4 *
5 * File: dinput.h
6 * Content: DirectInput include file
7 *
8 ****************************************************************************/
9
10#ifndef __DINPUT_INCLUDED__
11#define __DINPUT_INCLUDED__
12
13#ifndef DIJ_RINGZERO
14
15#ifdef _WIN32
16#define COM_NO_WINDOWS_H
17#include <objbase.h>
18#endif
19
20#endif /* DIJ_RINGZERO */
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#ifndef DIRECTINPUT_VERSION
27#define DIRECTINPUT_VERSION 0x0500
28#endif
29
30#ifndef DIJ_RINGZERO
31/****************************************************************************
32 *
33 * Class IDs
34 *
35 ****************************************************************************/
36
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);
39
40/****************************************************************************
41 *
42 * Interfaces
43 *
44 ****************************************************************************/
45
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);
50
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);
55
56DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
57
58/****************************************************************************
59 *
60 * Predefined object types
61 *
62 ****************************************************************************/
63
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);
71
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);
74
75DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
76
77DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
78
79/****************************************************************************
80 *
81 * Predefined product GUIDs
82 *
83 ****************************************************************************/
84
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);
88
89/****************************************************************************
90 *
91 * Predefined force feedback effects
92 *
93 ****************************************************************************/
94
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);
107
108
109#endif /* DIJ_RINGZERO */
110
111/****************************************************************************
112 *
113 * Interfaces and Structures...
114 *
115 ****************************************************************************/
116
117#if(DIRECTINPUT_VERSION >= 0x0500)
118
119/****************************************************************************
120 *
121 * IDirectInputEffect
122 *
123 ****************************************************************************/
124
125#define DIEFT_ALL 0x00000000
126
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
133
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
140
141#define DIEFT_GETTYPE(n) LOBYTE(n)
142
143#define DI_DEGREES 100
144#define DI_FFNOMINALMAX 10000
145#define DI_SECONDS 1000000
146
147typedef struct DICONSTANTFORCE {
151
152typedef struct DIRAMPFORCE {
153 LONG lStart;
154 LONG lEnd;
157
158typedef struct DIPERIODIC {
165
166typedef struct DICONDITION {
175
176typedef struct DICUSTOMFORCE {
183
184typedef struct DIENVELOPE {
192
193typedef struct DIEFFECT {
202 LPDWORD rgdwAxes;
208typedef const DIEFFECT *LPCDIEFFECT;
209
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
215
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
230
231#define DIES_SOLO 0x00000001
232#define DIES_NODOWNLOAD 0x80000000
233
234#define DIEGES_PLAYING 0x00000001
235#define DIEGES_EMULATED 0x00000002
236
237typedef struct DIEFFESCAPE {
245
246#ifndef DIJ_RINGZERO
247
248#undef INTERFACE
249#define INTERFACE IDirectInputEffect
250
251DECLARE_INTERFACE_(IDirectInputEffect, IUnknown)
252{
253 /*** IUnknown methods ***/
254 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
255 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
256 STDMETHOD_(ULONG,Release)(THIS) PURE;
257
258 /*** IDirectInputEffect methods ***/
259 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
260 STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
261 STDMETHOD(GetParameters)(THIS_ LPDIEFFECT,DWORD) PURE;
262 STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT,DWORD) PURE;
263 STDMETHOD(Start)(THIS_ DWORD,DWORD) PURE;
264 STDMETHOD(Stop)(THIS) PURE;
265 STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
266 STDMETHOD(Download)(THIS) PURE;
267 STDMETHOD(Unload)(THIS) PURE;
268 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
269};
270
271typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
272
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)
287#else
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)
301#endif
302
303#endif /* DIJ_RINGZERO */
304
305#endif /* DIRECTINPUT_VERSION >= 0x0500 */
306
307/****************************************************************************
308 *
309 * IDirectInputDevice
310 *
311 ****************************************************************************/
312
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
318
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
324
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
338
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
346
347#define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
348#define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
349
350#if(DIRECTINPUT_VERSION >= 0x0500)
351/* This structure is defined for DirectX 3.0 compatibility */
352
353typedef struct DIDEVCAPS_DX3 {
361#endif /* DIRECTINPUT_VERSION >= 0x0500 */
362
363typedef struct DIDEVCAPS {
370#if(DIRECTINPUT_VERSION >= 0x0500)
376#endif /* DIRECTINPUT_VERSION >= 0x0500 */
378
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
391#endif /* DIRECTINPUT_VERSION >= 0x0500 */
392
393#define DIDFT_ALL 0x00000000
394
395#define DIDFT_RELAXIS 0x00000001
396#define DIDFT_ABSAXIS 0x00000002
397#define DIDFT_AXIS 0x00000003
398
399#define DIDFT_PSHBUTTON 0x00000004
400#define DIDFT_TGLBUTTON 0x00000008
401#define DIDFT_BUTTON 0x0000000C
402
403#define DIDFT_POV 0x00000010
404
405#define DIDFT_COLLECTION 0x00000040
406#define DIDFT_NODATA 0x00000080
407
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
415
416#define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
417#define DIDFT_NOCOLLECTION 0x00FFFF00
418
419
420#ifndef DIJ_RINGZERO
421
422typedef struct _DIOBJECTDATAFORMAT {
423 const GUID *pguid;
429
430typedef struct _DIDATAFORMAT {
439
440#define DIDF_ABSAXIS 0x00000001
441#define DIDF_RELAXIS 0x00000002
442
443extern const DIDATAFORMAT c_dfDIMouse;
444extern const DIDATAFORMAT c_dfDIKeyboard;
445extern const DIDATAFORMAT c_dfDIJoystick;
446extern const DIDATAFORMAT c_dfDIJoystick2;
447
448#if(DIRECTINPUT_VERSION >= 0x0500)
449/* These structures are defined for DirectX 3.0 compatibility */
450
457 CHAR tszName[MAX_PATH];
465 WCHAR tszName[MAX_PATH];
467#ifdef UNICODE
470#else
473#endif // UNICODE
477#endif /* DIRECTINPUT_VERSION >= 0x0500 */
478
485 CHAR tszName[MAX_PATH];
486#if(DIRECTINPUT_VERSION >= 0x0500)
492 WORD wUsage;
496#endif /* DIRECTINPUT_VERSION >= 0x0500 */
504 WCHAR tszName[MAX_PATH];
505#if(DIRECTINPUT_VERSION >= 0x0500)
511 WORD wUsage;
515#endif /* DIRECTINPUT_VERSION >= 0x0500 */
517#ifdef UNICODE
520#else
523#endif // UNICODE
527
528typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
529typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW, LPVOID);
530#ifdef UNICODE
531#define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKW
532#else
533#define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKA
534#endif // !UNICODE
535
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
545#endif /* DIRECTINPUT_VERSION >= 0x0500 */
546
547typedef struct DIPROPHEADER {
554
555#define DIPH_DEVICE 0
556#define DIPH_BYOFFSET 1
557#define DIPH_BYID 2
558
559typedef struct DIPROPDWORD {
564
565typedef struct DIPROPRANGE {
567 LONG lMin;
568 LONG lMax;
571
572#define DIPROPRANGE_NOMIN ((LONG)0x80000000)
573#define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
574
575#ifdef __cplusplus
576#define MAKEDIPROP(prop) (*(const GUID *)(prop))
577#else
578#define MAKEDIPROP(prop) ((REFGUID)(prop))
579#endif
580
581#define DIPROP_BUFFERSIZE MAKEDIPROP(1)
582
583#define DIPROP_AXISMODE MAKEDIPROP(2)
584
585#define DIPROPAXISMODE_ABS 0
586#define DIPROPAXISMODE_REL 1
587
588#define DIPROP_GRANULARITY MAKEDIPROP(3)
589
590#define DIPROP_RANGE MAKEDIPROP(4)
591
592#define DIPROP_DEADZONE MAKEDIPROP(5)
593
594#define DIPROP_SATURATION MAKEDIPROP(6)
595
596#define DIPROP_FFGAIN MAKEDIPROP(7)
597
598#define DIPROP_FFLOAD MAKEDIPROP(8)
599
600#define DIPROP_AUTOCENTER MAKEDIPROP(9)
601
602#define DIPROPAUTOCENTER_OFF 0
603#define DIPROPAUTOCENTER_ON 1
604
605#define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
606
607#define DIPROPCALIBRATIONMODE_COOKED 0
608#define DIPROPCALIBRATIONMODE_RAW 1
609
610typedef struct DIDEVICEOBJECTDATA {
617
618#define DIGDD_PEEK 0x00000001
619
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
626
627#if(DIRECTINPUT_VERSION >= 0x0500)
628/* These structures are defined for DirectX 3.0 compatibility */
629
630typedef struct DIDEVICEINSTANCE_DX3A {
635 CHAR tszInstanceName[MAX_PATH];
636 CHAR tszProductName[MAX_PATH];
638typedef struct DIDEVICEINSTANCE_DX3W {
643 WCHAR tszInstanceName[MAX_PATH];
644 WCHAR tszProductName[MAX_PATH];
646#ifdef UNICODE
649#else
652#endif // UNICODE
656#endif /* DIRECTINPUT_VERSION >= 0x0500 */
657
658typedef struct DIDEVICEINSTANCEA {
663 CHAR tszInstanceName[MAX_PATH];
664 CHAR tszProductName[MAX_PATH];
665#if(DIRECTINPUT_VERSION >= 0x0500)
668 WORD wUsage;
669#endif /* DIRECTINPUT_VERSION >= 0x0500 */
671typedef struct DIDEVICEINSTANCEW {
676 WCHAR tszInstanceName[MAX_PATH];
677 WCHAR tszProductName[MAX_PATH];
678#if(DIRECTINPUT_VERSION >= 0x0500)
681 WORD wUsage;
682#endif /* DIRECTINPUT_VERSION >= 0x0500 */
684#ifdef UNICODE
687#else
690#endif // UNICODE
694
695#undef INTERFACE
696#define INTERFACE IDirectInputDeviceW
697
698DECLARE_INTERFACE_(IDirectInputDeviceW, IUnknown)
699{
700 /*** IUnknown methods ***/
701 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
702 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
703 STDMETHOD_(ULONG,Release)(THIS) PURE;
704
705 /*** IDirectInputDeviceW methods ***/
706 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
707 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
708 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
709 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
710 STDMETHOD(Acquire)(THIS) PURE;
711 STDMETHOD(Unacquire)(THIS) PURE;
712 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
713 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
714 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
715 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
716 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
717 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
718 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
719 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
720 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
721};
722
723typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
724
725#undef INTERFACE
726#define INTERFACE IDirectInputDeviceA
727
728DECLARE_INTERFACE_(IDirectInputDeviceA, IUnknown)
729{
730 /*** IUnknown methods ***/
731 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
732 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
733 STDMETHOD_(ULONG,Release)(THIS) PURE;
734
735 /*** IDirectInputDeviceA methods ***/
736 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
737 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
738 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
739 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
740 STDMETHOD(Acquire)(THIS) PURE;
741 STDMETHOD(Unacquire)(THIS) PURE;
742 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
743 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
744 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
745 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
746 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
747 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
748 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
749 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
750 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
751};
752
753typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
754
755#ifdef UNICODE
756#define IID_IDirectInputDevice IID_IDirectInputDeviceW
757#define IDirectInputDevice IDirectInputDeviceW
758#define IDirectInputDeviceVtbl IDirectInputDeviceWVtbl
759#else
760#define IID_IDirectInputDevice IID_IDirectInputDeviceA
761#define IDirectInputDevice IDirectInputDeviceA
762#define IDirectInputDeviceVtbl IDirectInputDeviceAVtbl
763#endif
765
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)
785#else
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)
804#endif
805
806#endif /* DIJ_RINGZERO */
807
808
809#if(DIRECTINPUT_VERSION >= 0x0500)
810
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
817
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
830
831#ifndef DIJ_RINGZERO
832
833typedef struct DIEFFECTINFOA {
835 GUID guid;
839 CHAR tszName[MAX_PATH];
841typedef struct DIEFFECTINFOW {
843 GUID guid;
847 WCHAR tszName[MAX_PATH];
849#ifdef UNICODE
852#else
855#endif // UNICODE
859
860typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
861typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
862#ifdef UNICODE
863#define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKW
864#else
865#define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKA
866#endif // !UNICODE
867typedef BOOL (FAR PASCAL * LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
868
869#undef INTERFACE
870#define INTERFACE IDirectInputDevice2W
871
872DECLARE_INTERFACE_(IDirectInputDevice2W, IDirectInputDeviceW)
873{
874 /*** IUnknown methods ***/
875 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
876 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
877 STDMETHOD_(ULONG,Release)(THIS) PURE;
878
879 /*** IDirectInputDeviceW methods ***/
880 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
881 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
882 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
883 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
884 STDMETHOD(Acquire)(THIS) PURE;
885 STDMETHOD(Unacquire)(THIS) PURE;
886 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
887 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
888 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
889 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
890 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
891 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
892 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
893 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
894 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
895
896 /*** IDirectInputDevice2W methods ***/
897 STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
898 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
899 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
900 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
901 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
902 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
903 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
904 STDMETHOD(Poll)(THIS) PURE;
905 STDMETHOD(SendDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
906};
907
908typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
909
910#undef INTERFACE
911#define INTERFACE IDirectInputDevice2A
912
913DECLARE_INTERFACE_(IDirectInputDevice2A, IDirectInputDeviceA)
914{
915 /*** IUnknown methods ***/
916 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
917 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
918 STDMETHOD_(ULONG,Release)(THIS) PURE;
919
920 /*** IDirectInputDeviceA methods ***/
921 STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
922 STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
923 STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
924 STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
925 STDMETHOD(Acquire)(THIS) PURE;
926 STDMETHOD(Unacquire)(THIS) PURE;
927 STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
928 STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
929 STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
930 STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
931 STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
932 STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
933 STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
934 STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
935 STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
936
937 /*** IDirectInputDevice2A methods ***/
938 STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
939 STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
940 STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
941 STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
942 STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
943 STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
944 STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
945 STDMETHOD(Poll)(THIS) PURE;
946 STDMETHOD(SendDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
947};
948
949typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
950
951#ifdef UNICODE
952#define IID_IDirectInputDevice2 IID_IDirectInputDevice2W
953#define IDirectInputDevice2 IDirectInputDevice2W
954#define IDirectInputDevice2Vtbl IDirectInputDevice2WVtbl
955#else
956#define IID_IDirectInputDevice2 IID_IDirectInputDevice2A
957#define IDirectInputDevice2 IDirectInputDevice2A
958#define IDirectInputDevice2Vtbl IDirectInputDevice2AVtbl
959#endif
961
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)
990#else
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)
1018#endif
1019
1020#endif /* DIJ_RINGZERO */
1021
1022#endif /* DIRECTINPUT_VERSION >= 0x0500 */
1023
1024/****************************************************************************
1025 *
1026 * Mouse
1027 *
1028 ****************************************************************************/
1029
1030#ifndef DIJ_RINGZERO
1031
1032typedef struct _DIMOUSESTATE {
1033 LONG lX;
1034 LONG lY;
1035 LONG lZ;
1036 BYTE rgbButtons[4];
1038
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)
1046
1047#endif /* DIJ_RINGZERO */
1048
1049/****************************************************************************
1050 *
1051 * Keyboard
1052 *
1053 ****************************************************************************/
1054
1055#ifndef DIJ_RINGZERO
1056
1057/****************************************************************************
1058 *
1059 * DirectInput keyboard scan codes
1060 *
1061 ****************************************************************************/
1062
1064#define DIK_ESCAPE 0x01
1065#define DIK_1 0x02
1066#define DIK_2 0x03
1067#define DIK_3 0x04
1068#define DIK_4 0x05
1069#define DIK_5 0x06
1070#define DIK_6 0x07
1071#define DIK_7 0x08
1072#define DIK_8 0x09
1073#define DIK_9 0x0A
1074#define DIK_0 0x0B
1075#define DIK_MINUS 0x0C
1076#define DIK_EQUALS 0x0D
1077#define DIK_BACK 0x0E
1078#define DIK_TAB 0x0F
1079#define DIK_Q 0x10
1080#define DIK_W 0x11
1081#define DIK_E 0x12
1082#define DIK_R 0x13
1083#define DIK_T 0x14
1084#define DIK_Y 0x15
1085#define DIK_U 0x16
1086#define DIK_I 0x17
1087#define DIK_O 0x18
1088#define DIK_P 0x19
1089#define DIK_LBRACKET 0x1A
1090#define DIK_RBRACKET 0x1B
1091#define DIK_RETURN 0x1C
1092#define DIK_LCONTROL 0x1D
1093#define DIK_A 0x1E
1094#define DIK_S 0x1F
1095#define DIK_D 0x20
1096#define DIK_F 0x21
1097#define DIK_G 0x22
1098#define DIK_H 0x23
1099#define DIK_J 0x24
1100#define DIK_K 0x25
1101#define DIK_L 0x26
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
1107#define DIK_Z 0x2C
1108#define DIK_X 0x2D
1109#define DIK_C 0x2E
1110#define DIK_V 0x2F
1111#define DIK_B 0x30
1112#define DIK_N 0x31
1113#define DIK_M 0x32
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
1122#define DIK_F1 0x3B
1123#define DIK_F2 0x3C
1124#define DIK_F3 0x3D
1125#define DIK_F4 0x3E
1126#define DIK_F5 0x3F
1127#define DIK_F6 0x40
1128#define DIK_F7 0x41
1129#define DIK_F8 0x42
1130#define DIK_F9 0x43
1131#define DIK_F10 0x44
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
1141#define DIK_ADD 0x4E
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
1147#define DIK_F11 0x57
1148#define DIK_F12 0x58
1149
1150#define DIK_F13 0x64
1151#define DIK_F14 0x65
1152#define DIK_F15 0x66
1154#define DIK_KANA 0x70
1155#define DIK_CONVERT 0x79
1156#define DIK_NOCONVERT 0x7B
1157#define DIK_YEN 0x7D
1158#define DIK_NUMPADEQUALS 0x8D
1159#define DIK_CIRCUMFLEX 0x90
1160#define DIK_AT 0x91
1161#define DIK_COLON 0x92
1162#define DIK_UNDERLINE 0x93
1163#define DIK_KANJI 0x94
1164#define DIK_STOP 0x95
1165#define DIK_AX 0x96
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
1174#define DIK_UP 0xC8
1175#define DIK_PRIOR 0xC9
1176#define DIK_LEFT 0xCB
1177#define DIK_RIGHT 0xCD
1178#define DIK_END 0xCF
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
1187/*
1188 * Alternate names for keys, to facilitate transition from DOS.
1189 */
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
1206#endif /* DIJ_RINGZERO */
1207
1208/****************************************************************************
1209 *
1210 * Joystick
1211 *
1212 ****************************************************************************/
1213
1214#ifndef DIJ_RINGZERO
1215
1216typedef struct DIJOYSTATE {
1217 LONG lX;
1218 LONG lY;
1219 LONG lZ;
1220 LONG lRx;
1221 LONG lRy;
1222 LONG lRz;
1223 LONG rglSlider[2];
1225 BYTE rgbButtons[32];
1227
1228typedef struct DIJOYSTATE2 {
1229 LONG lX;
1230 LONG lY;
1231 LONG lZ;
1232 LONG lRx;
1233 LONG lRy;
1234 LONG lRz;
1235 LONG rglSlider[2];
1237 BYTE rgbButtons[128];
1238 LONG lVX;
1239 LONG lVY;
1240 LONG lVZ;
1241 LONG lVRx;
1242 LONG lVRy;
1243 LONG lVRz;
1244 LONG rglVSlider[2];
1245 LONG lAX;
1246 LONG lAY;
1247 LONG lAZ;
1248 LONG lARx;
1249 LONG lARy;
1250 LONG lARz;
1251 LONG rglASlider[2];
1252 LONG lFX;
1253 LONG lFY;
1254 LONG lFZ;
1255 LONG lFRx;
1256 LONG lFRy;
1257 LONG lFRz;
1258 LONG rglFSlider[2];
1260
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) + \
1268 (n) * sizeof(LONG))
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)
1304
1305
1306#endif /* DIJ_RINGZERO */
1307
1308/****************************************************************************
1309 *
1310 * IDirectInput
1311 *
1312 ****************************************************************************/
1313
1314#ifndef DIJ_RINGZERO
1315
1316#define DIENUM_STOP 0
1317#define DIENUM_CONTINUE 1
1318
1319typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA, LPVOID);
1320typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW, LPVOID);
1321#ifdef UNICODE
1322#define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKW
1323#else
1324#define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKA
1325#endif // !UNICODE
1326
1327#define DIEDFL_ALLDEVICES 0x00000000
1328#define DIEDFL_ATTACHEDONLY 0x00000001
1329#if(DIRECTINPUT_VERSION >= 0x0500)
1330#define DIEDFL_FORCEFEEDBACK 0x00000100
1331#endif /* DIRECTINPUT_VERSION >= 0x0500 */
1332
1333#undef INTERFACE
1334#define INTERFACE IDirectInputW
1335
1337{
1338 /*** IUnknown methods ***/
1339 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1340 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1341 STDMETHOD_(ULONG,Release)(THIS) PURE;
1342
1343 /*** IDirectInputW methods ***/
1344 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) 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;
1349};
1350
1351typedef struct IDirectInputW *LPDIRECTINPUTW;
1352
1353#undef INTERFACE
1354#define INTERFACE IDirectInputA
1355
1357{
1358 /*** IUnknown methods ***/
1359 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1360 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1361 STDMETHOD_(ULONG,Release)(THIS) PURE;
1362
1363 /*** IDirectInputA methods ***/
1364 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) 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;
1369};
1370
1371typedef struct IDirectInputA *LPDIRECTINPUTA;
1372
1373#ifdef UNICODE
1374#define IID_IDirectInput IID_IDirectInputW
1375#define IDirectInput IDirectInputW
1376#define IDirectInputVtbl IDirectInputWVtbl
1377#else
1378#define IID_IDirectInput IID_IDirectInputA
1379#define IDirectInput IDirectInputA
1380#define IDirectInputVtbl IDirectInputAVtbl
1381#endif
1383
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)
1393#else
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)
1402#endif
1403
1404#undef INTERFACE
1405#define INTERFACE IDirectInput2W
1406
1407DECLARE_INTERFACE_(IDirectInput2W, IDirectInputW)
1408{
1409 /*** IUnknown methods ***/
1410 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1411 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1412 STDMETHOD_(ULONG,Release)(THIS) PURE;
1413
1414 /*** IDirectInputW methods ***/
1415 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) 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;
1420
1421 /*** IDirectInput2W methods ***/
1422 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
1423};
1424
1425typedef struct IDirectInput2W *LPDIRECTINPUT2W;
1426
1427#undef INTERFACE
1428#define INTERFACE IDirectInput2A
1429
1430DECLARE_INTERFACE_(IDirectInput2A, IDirectInputA)
1431{
1432 /*** IUnknown methods ***/
1433 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1434 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1435 STDMETHOD_(ULONG,Release)(THIS) PURE;
1436
1437 /*** IDirectInputA methods ***/
1438 STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) 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;
1443
1444 /*** IDirectInput2A methods ***/
1445 STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
1446};
1447
1448typedef struct IDirectInput2A *LPDIRECTINPUT2A;
1449
1450#ifdef UNICODE
1451#define IID_IDirectInput2 IID_IDirectInput2W
1452#define IDirectInput2 IDirectInput2W
1453#define IDirectInput2Vtbl IDirectInput2WVtbl
1454#else
1455#define IID_IDirectInput2 IID_IDirectInput2A
1456#define IDirectInput2 IDirectInput2A
1457#define IDirectInput2Vtbl IDirectInput2AVtbl
1458#endif
1460
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)
1471#else
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)
1481#endif
1482
1483extern HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter);
1484extern HRESULT WINAPI DirectInputCreateW(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTW *ppDI, LPUNKNOWN punkOuter);
1485#ifdef UNICODE
1486#define DirectInputCreate DirectInputCreateW
1487#else
1488#define DirectInputCreate DirectInputCreateA
1489#endif // !UNICODE
1490
1491#endif /* DIJ_RINGZERO */
1492
1493
1494/****************************************************************************
1495 *
1496 * Return Codes
1497 *
1498 ****************************************************************************/
1499
1503#define DI_OK S_OK
1504
1508#define DI_NOTATTACHED S_FALSE
1509
1513#define DI_BUFFEROVERFLOW S_FALSE
1514
1518#define DI_PROPNOEFFECT S_FALSE
1519
1523#define DI_NOEFFECT S_FALSE
1524
1530#define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
1531
1538#define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
1539
1545#define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
1546
1552#define DI_TRUNCATED ((HRESULT)0x00000008L)
1553
1557#define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
1558
1562#define DIERR_OLDDIRECTINPUTVERSION \
1563 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
1564
1569#define DIERR_BETADIRECTINPUTVERSION \
1570 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
1571
1576#define DIERR_BADDRIVERVER \
1577 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
1578
1582#define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
1583
1587#define DIERR_NOTFOUND \
1588 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
1589
1593#define DIERR_OBJECTNOTFOUND \
1594 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
1595
1601#define DIERR_INVALIDPARAM E_INVALIDARG
1602
1606#define DIERR_NOINTERFACE E_NOINTERFACE
1607
1611#define DIERR_GENERIC E_FAIL
1612
1617#define DIERR_OUTOFMEMORY E_OUTOFMEMORY
1618
1622#define DIERR_UNSUPPORTED E_NOTIMPL
1623
1627#define DIERR_NOTINITIALIZED \
1628 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
1629
1633#define DIERR_ALREADYINITIALIZED \
1634 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
1635
1639#define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
1640
1645#define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
1646
1650#define DIERR_INPUTLOST \
1651 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
1652
1656#define DIERR_ACQUIRED \
1657 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
1658
1662#define DIERR_NOTACQUIRED \
1663 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
1664
1668#define DIERR_READONLY E_ACCESSDENIED
1669
1673#define DIERR_HANDLEEXISTS E_ACCESSDENIED
1674
1678#ifndef E_PENDING
1679#define E_PENDING 0x80070007L
1680#endif
1681
1687#define DIERR_INSUFFICIENTPRIVS 0x80040200L
1688
1692#define DIERR_DEVICEFULL 0x80040201L
1693
1697#define DIERR_MOREDATA 0x80040202L
1698
1702#define DIERR_NOTDOWNLOADED 0x80040203L
1703
1708#define DIERR_HASEFFECTS 0x80040204L
1709
1714#define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
1715
1721#define DIERR_INCOMPLETEEFFECT 0x80040206L
1722
1727#define DIERR_NOTBUFFERED 0x80040207L
1728
1734#define DIERR_EFFECTPLAYING 0x80040208L
1735
1736#ifdef __cplusplus
1737};
1738#endif
1739
1740#endif /* __DINPUT_INCLUDED__ */
1741
1742/****************************************************************************
1743 *
1744 * Definitions for non-IDirectInput (VJoyD) features defined more recently
1745 * than the current sdk files
1746 *
1747 ****************************************************************************/
1748
1749#ifdef _INC_MMSYSTEM
1750#ifndef MMNOJOY
1751
1752#ifndef __VJOYDX_INCLUDED__
1753#define __VJOYDX_INCLUDED__
1754
1755#ifdef __cplusplus
1756extern "C" {
1757#endif
1758
1764#define JOY_PASSDRIVERDATA 0x10000000l
1765
1771WINMMAPI MMRESULT WINAPI joyConfigChanged( DWORD dwFlags );
1772
1776#define JOY_HWS_ISHEADTRACKER 0x02000000l
1777
1782#define JOY_HWS_ISGAMEPORTDRIVER 0x04000000l
1783
1788#define JOY_HWS_ISANALOGPORTDRIVER 0x08000000l
1789
1795#define JOY_HWS_AUTOLOAD 0x10000000l
1796
1801#define JOY_HWS_NODEVNODE 0x20000000l
1802
1807#define JOY_HWS_ISGAMEPORTEMULATOR 0x40000000l
1808
1809
1814#define JOY_US_VOLATILE 0x00000008L
1815
1816#ifdef __cplusplus
1817};
1818#endif
1819
1820#endif /* __VJOYDX_INCLUDED__ */
1821
1822#endif /* not MMNOJOY */
1823#endif /* _INC_MMSYSTEM */
1824
1825/****************************************************************************
1826 *
1827 * Definitions for non-IDirectInput (VJoyD) features defined more recently
1828 * than the current ddk files
1829 *
1830 ****************************************************************************/
1831
1832#ifndef DIJ_RINGZERO
1833
1834#ifdef _INC_MMDDK
1835#ifndef MMNOJOYDEV
1836
1837#ifndef __VJOYDXD_INCLUDED__
1838#define __VJOYDXD_INCLUDED__
1843#define JOY_OEMPOLL_PASSDRIVERDATA 7
1844
1845#endif /* __VJOYDXD_INCLUDED__ */
1846
1847#endif /* not MMNOJOYDEV */
1848#endif /* _INC_MMDDK */
1849
1850#endif /* DIJ_RINGZERO */
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
struct DIDEVCAPS DIDEVCAPS
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
struct DIDEVICEOBJECTINSTANCEA DIDEVICEOBJECTINSTANCEA
const DIDATAFORMAT c_dfDIMouse
struct DIDEVICEINSTANCEA DIDEVICEINSTANCEA
struct DIDEVICEOBJECTDATA DIDEVICEOBJECTDATA
struct DIEFFECTINFOA DIEFFECTINFOA
#define IDirectInputDevice
Definition: dinput.h:761
struct DIDEVICEINSTANCEA * LPDIDEVICEINSTANCEA
struct DIPROPDWORD * LPDIPROPDWORD
const DIDEVICEOBJECTINSTANCE_DX3A * LPCDIDEVICEOBJECTINSTANCE_DX3A
Definition: dinput.h:474
HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter)
const DIDATAFORMAT c_dfDIJoystick2
const DIDATAFORMAT c_dfDIJoystick
struct DIEFFECTINFOA * LPDIEFFECTINFOA
struct DIPROPRANGE DIPROPRANGE
const DIDEVICEINSTANCE * LPCDIDEVICEINSTANCE
Definition: dinput.h:693
const DIDEVICEOBJECTDATA * LPCDIDEVICEOBJECTDATA
Definition: dinput.h:616
struct DIDEVICEOBJECTINSTANCE_DX3W DIDEVICEOBJECTINSTANCE_DX3W
struct _DIDATAFORMAT DIDATAFORMAT
struct DIDEVCAPS * LPDIDEVCAPS
struct IDirectInputDeviceA * LPDIRECTINPUTDEVICEA
Definition: dinput.h:753
struct DIDEVICEINSTANCEW DIDEVICEINSTANCEW
const DIEFFECTINFO * LPCDIEFFECTINFO
Definition: dinput.h:858
struct _DIOBJECTDATAFORMAT DIOBJECTDATAFORMAT
struct IDirectInputDevice2W * LPDIRECTINPUTDEVICE2W
Definition: dinput.h:908
struct DIEFFECTINFOW * LPDIEFFECTINFOW
struct DIJOYSTATE2 DIJOYSTATE2
const DIPROPRANGE * LPCDIPROPRANGE
Definition: dinput.h:570
struct IDirectInputDeviceW * LPDIRECTINPUTDEVICEW
Definition: dinput.h:723
struct IDirectInputDevice * LPDIRECTINPUTDEVICE
Definition: dinput.h:764
struct DIDEVICEOBJECTINSTANCE_DX3A DIDEVICEOBJECTINSTANCE_DX3A
struct DIENVELOPE DIENVELOPE
const DIRAMPFORCE * LPCDIRAMPFORCE
Definition: dinput.h:156
const DIENVELOPE * LPCDIENVELOPE
Definition: dinput.h:191
const DIOBJECTDATAFORMAT * LPCDIOBJECTDATAFORMAT
Definition: dinput.h:428
HRESULT WINAPI DirectInputCreateW(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTW *ppDI, LPUNKNOWN punkOuter)
const DIDEVICEINSTANCE_DX3W * LPCDIDEVICEINSTANCE_DX3W
Definition: dinput.h:654
struct DIDEVICEOBJECTINSTANCEA * LPDIDEVICEOBJECTINSTANCEA
const DICONSTANTFORCE * LPCDICONSTANTFORCE
Definition: dinput.h:150
struct DIRAMPFORCE * LPDIRAMPFORCE
struct DIPROPDWORD DIPROPDWORD
DIEFFECTINFOA DIEFFECTINFO
Definition: dinput.h:853
const DICUSTOMFORCE * LPCDICUSTOMFORCE
Definition: dinput.h:182
struct IDirectInput2W * LPDIRECTINPUT2W
Definition: dinput.h:1425
LPDIDEVICEOBJECTINSTANCEA LPDIDEVICEOBJECTINSTANCE
Definition: dinput.h:522
const DIDEVICEOBJECTINSTANCEA * LPCDIDEVICEOBJECTINSTANCEA
Definition: dinput.h:524
struct DIEFFECT DIEFFECT
struct DICUSTOMFORCE DICUSTOMFORCE
struct IDirectInput2 * LPDIRECTINPUT2
Definition: dinput.h:1459
struct IDirectInputW * LPDIRECTINPUTW
Definition: dinput.h:1351
struct DIJOYSTATE DIJOYSTATE
struct DIPERIODIC * LPDIPERIODIC
const DIPERIODIC * LPCDIPERIODIC
Definition: dinput.h:164
struct DIDEVCAPS_DX3 DIDEVCAPS_DX3
const DIDATAFORMAT c_dfDIKeyboard
const DIEFFECT * LPCDIEFFECT
Definition: dinput.h:208
struct DIDEVICEINSTANCE_DX3W DIDEVICEINSTANCE_DX3W
struct IDirectInputA * LPDIRECTINPUTA
Definition: dinput.h:1371
const DIEFFECTINFOW * LPCDIEFFECTINFOW
Definition: dinput.h:857
struct DICONSTANTFORCE DICONSTANTFORCE
const DIDEVICEOBJECTINSTANCE_DX3W * LPCDIDEVICEOBJECTINSTANCE_DX3W
Definition: dinput.h:475
struct DIEFFESCAPE * LPDIEFFESCAPE
struct DIJOYSTATE2 * LPDIJOYSTATE2
const DIPROPDWORD * LPCDIPROPDWORD
Definition: dinput.h:563
const DIDEVICEOBJECTINSTANCEW * LPCDIDEVICEOBJECTINSTANCEW
Definition: dinput.h:525
DIDEVICEINSTANCEA DIDEVICEINSTANCE
Definition: dinput.h:688
struct IDirectInput2A * LPDIRECTINPUT2A
Definition: dinput.h:1448
const DIDEVICEINSTANCEW * LPCDIDEVICEINSTANCEW
Definition: dinput.h:692
#define IDirectInputDevice2
Definition: dinput.h:957
struct DIDEVICEOBJECTINSTANCEW * LPDIDEVICEOBJECTINSTANCEW
DIDEVICEOBJECTINSTANCEA DIDEVICEOBJECTINSTANCE
Definition: dinput.h:521
LPDIDEVICEOBJECTINSTANCE_DX3A LPDIDEVICEOBJECTINSTANCE_DX3
Definition: dinput.h:472
const DIDEVICEOBJECTINSTANCE * LPCDIDEVICEOBJECTINSTANCE
Definition: dinput.h:526
struct DIDEVICEINSTANCEW * LPDIDEVICEINSTANCEW
struct DIDEVICEINSTANCE_DX3W * LPDIDEVICEINSTANCE_DX3W
const DIDEVICEINSTANCEA * LPCDIDEVICEINSTANCEA
Definition: dinput.h:691
struct DIRAMPFORCE DIRAMPFORCE
struct IDirectInputDevice2A * LPDIRECTINPUTDEVICE2A
Definition: dinput.h:949
const DIDEVICEINSTANCE_DX3 * LPCDIDEVICEINSTANCE_DX3
Definition: dinput.h:655
DECLARE_INTERFACE_(IDirectInputEffect, IUnknown)
Definition: dinput.h:251
const DIPROPHEADER * LPCDIPROPHEADER
Definition: dinput.h:553
struct DIPROPHEADER * LPDIPROPHEADER
struct DIDEVICEOBJECTDATA * LPDIDEVICEOBJECTDATA
struct DICONDITION * LPDICONDITION
const DIDATAFORMAT * LPCDIDATAFORMAT
Definition: dinput.h:438
struct IDirectInput * LPDIRECTINPUT
Definition: dinput.h:1382
const DICONDITION * LPCDICONDITION
Definition: dinput.h:174
DIDEVICEOBJECTINSTANCE_DX3A DIDEVICEOBJECTINSTANCE_DX3
Definition: dinput.h:471
LPDIDEVICEINSTANCEA LPDIDEVICEINSTANCE
Definition: dinput.h:689
struct _DIMOUSESTATE * LPDIMOUSESTATE
struct IDirectInputEffect * LPDIRECTINPUTEFFECT
Definition: dinput.h:271
struct DIEFFECTINFOW DIEFFECTINFOW
struct _DIMOUSESTATE DIMOUSESTATE
struct _DIOBJECTDATAFORMAT * LPDIOBJECTDATAFORMAT
struct DIPROPHEADER DIPROPHEADER
struct IDirectInputDevice2 * LPDIRECTINPUTDEVICE2
Definition: dinput.h:960
const DIDEVICEOBJECTINSTANCE_DX3 * LPCDIDEVICEOBJECTINSTANCE_DX3
Definition: dinput.h:476
struct DICONSTANTFORCE * LPDICONSTANTFORCE
DEFINE_GUID(CLSID_DirectInput, 0x25E609E0, 0xB259, 0x11CF, 0xBF, 0xC7, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00)
const DIEFFECTINFOA * LPCDIEFFECTINFOA
Definition: dinput.h:856
struct DIEFFECT * LPDIEFFECT
struct _DIDATAFORMAT * LPDIDATAFORMAT
DIDEVICEINSTANCE_DX3A DIDEVICEINSTANCE_DX3
Definition: dinput.h:650
struct DICUSTOMFORCE * LPDICUSTOMFORCE
struct DIENVELOPE * LPDIENVELOPE
#define IDirectInput
Definition: dinput.h:1379
LPDIEFFECTINFOA LPDIEFFECTINFO
Definition: dinput.h:854
struct DIPERIODIC DIPERIODIC
typedef LPVOID
Definition: dinput.h:528
struct DIJOYSTATE * LPDIJOYSTATE
struct DIEFFESCAPE DIEFFESCAPE
struct DIDEVICEOBJECTINSTANCE_DX3A * LPDIDEVICEOBJECTINSTANCE_DX3A
const DIDEVICEINSTANCE_DX3A * LPCDIDEVICEINSTANCE_DX3A
Definition: dinput.h:653
struct DIDEVICEOBJECTINSTANCEW DIDEVICEOBJECTINSTANCEW
struct DIDEVICEINSTANCE_DX3A * LPDIDEVICEINSTANCE_DX3A
struct DIDEVICEINSTANCE_DX3A DIDEVICEINSTANCE_DX3A
struct DIDEVICEOBJECTINSTANCE_DX3W * LPDIDEVICEOBJECTINSTANCE_DX3W
struct DIPROPRANGE * LPDIPROPRANGE
struct DIDEVCAPS_DX3 * LPDIDEVCAPS_DX3
#define IDirectInput2
Definition: dinput.h:1456
struct DICONDITION DICONDITION
LPDIDEVICEINSTANCE_DX3A LPDIDEVICEINSTANCE_DX3
Definition: dinput.h:651
LPDWORD DWORD dwFlags
Definition: dplay.h:417
Definition: dinput.h:166
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
Definition: dinput.h:147
LONG lMagnitude
Definition: dinput.h:148
Definition: dinput.h:176
DWORD dwSamplePeriod
Definition: dinput.h:178
LPLONG rglForceData
Definition: dinput.h:180
DWORD cChannels
Definition: dinput.h:177
DWORD cSamples
Definition: dinput.h:179
Definition: dinput.h:353
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
Definition: dinput.h:363
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
Definition: dinput.h:658
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
Definition: dinput.h:671
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
Definition: dinput.h:630
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
Definition: dinput.h:638
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
Definition: dinput.h:610
DWORD dwSequence
Definition: dinput.h:614
DWORD dwTimeStamp
Definition: dinput.h:613
DWORD dwData
Definition: dinput.h:612
DWORD dwOfs
Definition: dinput.h:611
Definition: dinput.h:479
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
Definition: dinput.h:498
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
Definition: dinput.h:451
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
Definition: dinput.h:459
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
Definition: dinput.h:833
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
Definition: dinput.h:841
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
Definition: dinput.h:193
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
Definition: dinput.h:237
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
Definition: dinput.h:184
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
Definition: dinput.h:158
DWORD dwPeriod
Definition: dinput.h:162
LONG lOffset
Definition: dinput.h:160
DWORD dwMagnitude
Definition: dinput.h:159
DWORD dwPhase
Definition: dinput.h:161
Definition: dinput.h:559
DIPROPHEADER diph
Definition: dinput.h:560
DWORD dwData
Definition: dinput.h:561
Definition: dinput.h:547
DWORD dwObj
Definition: dinput.h:550
DWORD dwSize
Definition: dinput.h:548
DWORD dwHeaderSize
Definition: dinput.h:549
DWORD dwHow
Definition: dinput.h:551
Definition: dinput.h:565
LONG lMin
Definition: dinput.h:567
LONG lMax
Definition: dinput.h:568
DIPROPHEADER diph
Definition: dinput.h:566
Definition: dinput.h:152
LONG lEnd
Definition: dinput.h:154
LONG lStart
Definition: dinput.h:153
Definition: dinput.h:430
LPDIOBJECTDATAFORMAT rgodf
Definition: dinput.h:436
DWORD dwFlags
Definition: dinput.h:433
DWORD dwSize
Definition: dinput.h:431
DWORD dwObjSize
Definition: dinput.h:432
DWORD dwDataSize
Definition: dinput.h:434
DWORD dwNumObjs
Definition: dinput.h:435
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
Definition: dinput.h:422
const GUID * pguid
Definition: dinput.h:423
DWORD dwType
Definition: dinput.h:425
DWORD dwFlags
Definition: dinput.h:426
DWORD dwOfs
Definition: dinput.h:424