Fixed a possible memory corruption.
[wine] / include / dinput.h
1 /*
2  * Copyright (C) the Wine project
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_DINPUT_H
20 #define __WINE_DINPUT_H
21
22 #include "windef.h" /* for MAX_PATH */
23 #include "objbase.h"
24
25 #ifndef DIRECTINPUT_VERSION
26 #define DIRECTINPUT_VERSION     0x0800
27 #endif
28
29 /* Classes */
30 DEFINE_GUID(CLSID_DirectInput,          0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
31 DEFINE_GUID(CLSID_DirectInputDevice,    0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
32
33 DEFINE_GUID(CLSID_DirectInput8,         0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
34 DEFINE_GUID(CLSID_DirectInputDevice8,   0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
35
36 /* Interfaces */
37 DEFINE_GUID(IID_IDirectInputA,          0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
38 DEFINE_GUID(IID_IDirectInputW,          0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
39 DEFINE_GUID(IID_IDirectInput2A,         0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
40 DEFINE_GUID(IID_IDirectInput2W,         0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
41 DEFINE_GUID(IID_IDirectInput7A,         0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
42 DEFINE_GUID(IID_IDirectInput7W,         0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
43 DEFINE_GUID(IID_IDirectInput8A,         0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
44 DEFINE_GUID(IID_IDirectInput8W,         0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
45 DEFINE_GUID(IID_IDirectInputDeviceA,    0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
46 DEFINE_GUID(IID_IDirectInputDeviceW,    0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
47 DEFINE_GUID(IID_IDirectInputDevice2A,   0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
48 DEFINE_GUID(IID_IDirectInputDevice2W,   0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
49 DEFINE_GUID(IID_IDirectInputDevice7A,   0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
50 DEFINE_GUID(IID_IDirectInputDevice7W,   0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
51 DEFINE_GUID(IID_IDirectInputDevice8A,   0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
52 DEFINE_GUID(IID_IDirectInputDevice8W,   0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
53 DEFINE_GUID(IID_IDirectInputEffect,     0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
54
55 /* Predefined object types */
56 DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
57 DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
58 DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
59 DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
60 DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
61 DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
62 DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
63 DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
64 DEFINE_GUID(GUID_Key,   0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
65 DEFINE_GUID(GUID_POV,   0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
66 DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
67
68 /* Predefined product GUIDs */
69 DEFINE_GUID(GUID_SysMouse,      0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
70 DEFINE_GUID(GUID_SysKeyboard,   0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
71 DEFINE_GUID(GUID_Joystick,      0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
72
73 /* predefined forcefeedback effects */
74 DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
75 DEFINE_GUID(GUID_RampForce,     0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
76 DEFINE_GUID(GUID_Square,        0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
77 DEFINE_GUID(GUID_Sine,          0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
78 DEFINE_GUID(GUID_Triangle,      0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
79 DEFINE_GUID(GUID_SawtoothUp,    0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
80 DEFINE_GUID(GUID_SawtoothDown,  0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
81 DEFINE_GUID(GUID_Spring,        0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
82 DEFINE_GUID(GUID_Damper,        0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
83 DEFINE_GUID(GUID_Inertia,       0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
84 DEFINE_GUID(GUID_Friction,      0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
85 DEFINE_GUID(GUID_CustomForce,   0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
86
87 typedef struct IDirectInputA IDirectInputA,*LPDIRECTINPUTA;
88 typedef struct IDirectInputW IDirectInputW,*LPDIRECTINPUTW;
89 typedef struct IDirectInput2A IDirectInput2A,*LPDIRECTINPUT2A;
90 typedef struct IDirectInput2W IDirectInput2W,*LPDIRECTINPUT2W;
91 typedef struct IDirectInput7A IDirectInput7A,*LPDIRECTINPUT7A;
92 typedef struct IDirectInput7W IDirectInput7W,*LPDIRECTINPUT7W;
93 typedef struct IDirectInput8A IDirectInput8A,*LPDIRECTINPUT8A;
94 typedef struct IDirectInput8W IDirectInput8W,*LPDIRECTINPUT8W;
95 typedef struct IDirectInputDeviceA IDirectInputDeviceA,*LPDIRECTINPUTDEVICEA;
96 typedef struct IDirectInputDeviceW IDirectInputDeviceW,*LPDIRECTINPUTDEVICEW;
97 typedef struct IDirectInputDevice2A IDirectInputDevice2A,*LPDIRECTINPUTDEVICE2A;
98 typedef struct IDirectInputDevice2W IDirectInputDevice2W,*LPDIRECTINPUTDEVICE2W;
99 typedef struct IDirectInputDevice7A IDirectInputDevice7A,*LPDIRECTINPUTDEVICE7A;
100 typedef struct IDirectInputDevice7W IDirectInputDevice7W,*LPDIRECTINPUTDEVICE7W;
101 typedef struct IDirectInputDevice8A IDirectInputDevice8A,*LPDIRECTINPUTDEVICE8A;
102 typedef struct IDirectInputDevice8W IDirectInputDevice8W,*LPDIRECTINPUTDEVICE8W;
103 typedef struct IDirectInputEffect IDirectInputEffect,*LPDIRECTINPUTEFFECT;
104 typedef struct SysKeyboardA SysKeyboardA,*LPSYSKEYBOARDA;
105 typedef struct SysMouseA SysMouseA,*LPSYSMOUSEA;
106
107 #define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
108 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT)
109 #define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
110 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2)
111 #define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
112 DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7)
113 #define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
114 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE)
115 #define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
116 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2)
117 #define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
118 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7)
119 #define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
120 DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8)
121
122 #define DI_OK                           S_OK
123 #define DI_NOTATTACHED                  S_FALSE
124 #define DI_BUFFEROVERFLOW               S_FALSE
125 #define DI_PROPNOEFFECT                 S_FALSE
126 #define DI_NOEFFECT                     S_FALSE
127 #define DI_POLLEDDEVICE                 ((HRESULT)0x00000002L)
128 #define DI_DOWNLOADSKIPPED              ((HRESULT)0x00000003L)
129 #define DI_EFFECTRESTARTED              ((HRESULT)0x00000004L)
130 #define DI_TRUNCATED                    ((HRESULT)0x00000008L)
131 #define DI_TRUNCATEDANDRESTARTED        ((HRESULT)0x0000000CL)
132
133 #define DIERR_OLDDIRECTINPUTVERSION     \
134     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
135 #define DIERR_BETADIRECTINPUTVERSION    \
136     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
137 #define DIERR_BADDRIVERVER              \
138     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
139 #define DIERR_DEVICENOTREG              REGDB_E_CLASSNOTREG
140 #define DIERR_NOTFOUND                  \
141     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
142 #define DIERR_OBJECTNOTFOUND            \
143     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
144 #define DIERR_INVALIDPARAM              E_INVALIDARG
145 #define DIERR_NOINTERFACE               E_NOINTERFACE
146 #define DIERR_GENERIC                   E_FAIL
147 #define DIERR_OUTOFMEMORY               E_OUTOFMEMORY
148 #define DIERR_UNSUPPORTED               E_NOTIMPL
149 #define DIERR_NOTINITIALIZED            \
150     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
151 #define DIERR_ALREADYINITIALIZED        \
152     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
153 #define DIERR_NOAGGREGATION             CLASS_E_NOAGGREGATION
154 #define DIERR_OTHERAPPHASPRIO           E_ACCESSDENIED
155 #define DIERR_INPUTLOST                 \
156     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
157 #define DIERR_ACQUIRED                  \
158     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
159 #define DIERR_NOTACQUIRED               \
160     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
161 #define DIERR_READONLY                  E_ACCESSDENIED
162 #define DIERR_HANDLEEXISTS              E_ACCESSDENIED
163 #ifndef E_PENDING
164 #define E_PENDING                       0x8000000AL
165 #endif
166 #define DIERR_INSUFFICIENTPRIVS         0x80040200L
167 #define DIERR_DEVICEFULL                0x80040201L
168 #define DIERR_MOREDATA                  0x80040202L
169 #define DIERR_NOTDOWNLOADED             0x80040203L
170 #define DIERR_HASEFFECTS                0x80040204L
171 #define DIERR_NOTEXCLUSIVEACQUIRED      0x80040205L
172 #define DIERR_INCOMPLETEEFFECT          0x80040206L
173 #define DIERR_NOTBUFFERED               0x80040207L
174 #define DIERR_EFFECTPLAYING             0x80040208L
175 #define DIERR_UNPLUGGED                 0x80040209L
176 #define DIERR_REPORTFULL                0x8004020AL
177
178 #define DIENUM_STOP                     0
179 #define DIENUM_CONTINUE                 1
180
181 #define DIEDFL_ALLDEVICES               0x00000000
182 #define DIEDFL_ATTACHEDONLY             0x00000000
183 #define DIEDFL_FORCEFEEDBACK            0x00000100
184 #define DIEDFL_INCLUDEALIASES           0x00010000
185 #define DIEDFL_INCLUDEPHANTOMS          0x00020000
186 #define DIEDFL_INCLUDEHIDDEN            0x00040000
187
188 #define DIDEVTYPE_DEVICE                1
189 #define DIDEVTYPE_MOUSE                 2
190 #define DIDEVTYPE_KEYBOARD              3
191 #define DIDEVTYPE_JOYSTICK              4
192 #define DIDEVTYPE_HID                   0x00010000
193
194 #define DIDEVTYPEMOUSE_UNKNOWN          1
195 #define DIDEVTYPEMOUSE_TRADITIONAL      2
196 #define DIDEVTYPEMOUSE_FINGERSTICK      3
197 #define DIDEVTYPEMOUSE_TOUCHPAD         4
198 #define DIDEVTYPEMOUSE_TRACKBALL        5
199
200 #define DIDEVTYPEKEYBOARD_UNKNOWN       0
201 #define DIDEVTYPEKEYBOARD_PCXT          1
202 #define DIDEVTYPEKEYBOARD_OLIVETTI      2
203 #define DIDEVTYPEKEYBOARD_PCAT          3
204 #define DIDEVTYPEKEYBOARD_PCENH         4
205 #define DIDEVTYPEKEYBOARD_NOKIA1050     5
206 #define DIDEVTYPEKEYBOARD_NOKIA9140     6
207 #define DIDEVTYPEKEYBOARD_NEC98         7
208 #define DIDEVTYPEKEYBOARD_NEC98LAPTOP   8
209 #define DIDEVTYPEKEYBOARD_NEC98106      9
210 #define DIDEVTYPEKEYBOARD_JAPAN106     10
211 #define DIDEVTYPEKEYBOARD_JAPANAX      11
212 #define DIDEVTYPEKEYBOARD_J3100        12
213
214 #define DIDEVTYPEJOYSTICK_UNKNOWN       1
215 #define DIDEVTYPEJOYSTICK_TRADITIONAL   2
216 #define DIDEVTYPEJOYSTICK_FLIGHTSTICK   3
217 #define DIDEVTYPEJOYSTICK_GAMEPAD       4
218 #define DIDEVTYPEJOYSTICK_RUDDER        5
219 #define DIDEVTYPEJOYSTICK_WHEEL         6
220 #define DIDEVTYPEJOYSTICK_HEADTRACKER   7
221
222 #define GET_DIDEVICE_TYPE(dwDevType)     LOBYTE(dwDevType)
223 #define GET_DIDEVICE_SUBTYPE(dwDevType)  HIBYTE(dwDevType)
224
225 typedef struct {
226     DWORD       dwSize;
227     GUID        guidType;
228     DWORD       dwOfs;
229     DWORD       dwType;
230     DWORD       dwFlags;
231     CHAR        tszName[MAX_PATH];
232 #if(DIRECTINPUT_VERSION >= 0x0500)
233     DWORD       dwFFMaxForce;
234     DWORD       dwFFForceResolution;
235     WORD        wCollectionNumber;
236     WORD        wDesignatorIndex;
237     WORD        wUsagePage;
238     WORD        wUsage;
239     DWORD       dwDimension;
240     WORD        wExponent;
241     WORD        wReserved;
242 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
243 } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
244 typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
245
246 typedef struct {
247     DWORD       dwSize;
248     GUID        guidType;
249     DWORD       dwOfs;
250     DWORD       dwType;
251     DWORD       dwFlags;
252     WCHAR       tszName[MAX_PATH];
253 #if(DIRECTINPUT_VERSION >= 0x0500)
254     DWORD       dwFFMaxForce;
255     DWORD       dwFFForceResolution;
256     WORD        wCollectionNumber;
257     WORD        wDesignatorIndex;
258     WORD        wUsagePage;
259     WORD        wUsage;
260     DWORD       dwDimension;
261     WORD        wExponent;
262     WORD        wReserved;
263 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
264 } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
265 typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
266
267 DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)
268 DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)
269 DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)
270
271
272 typedef struct {
273     DWORD       dwSize;
274     GUID        guidInstance;
275     GUID        guidProduct;
276     DWORD       dwDevType;
277     CHAR        tszInstanceName[MAX_PATH];
278     CHAR        tszProductName[MAX_PATH];
279 #if(DIRECTINPUT_VERSION >= 0x0500)
280     GUID        guidFFDriver;
281     WORD        wUsagePage;
282     WORD        wUsage;
283 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
284 } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
285 typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
286
287 typedef struct {
288     DWORD       dwSize;
289     GUID        guidInstance;
290     GUID        guidProduct;
291     DWORD       dwDevType;
292     WCHAR       tszInstanceName[MAX_PATH];
293     WCHAR       tszProductName[MAX_PATH];
294 #if(DIRECTINPUT_VERSION >= 0x0500)
295     GUID        guidFFDriver;
296     WORD        wUsagePage;
297     WORD        wUsage;
298 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
299 } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
300 typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
301
302 DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)
303 DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)
304 DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)
305
306 typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);
307 typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);
308 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)
309
310 #if DIRECTINPUT_VERSION >= 0x0800
311 typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);
312 typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);
313 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)
314 #endif
315
316 typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);
317
318 typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);
319 typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);
320 DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)
321
322 typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
323
324 #define DIK_ESCAPE          0x01
325 #define DIK_1               0x02
326 #define DIK_2               0x03
327 #define DIK_3               0x04
328 #define DIK_4               0x05
329 #define DIK_5               0x06
330 #define DIK_6               0x07
331 #define DIK_7               0x08
332 #define DIK_8               0x09
333 #define DIK_9               0x0A
334 #define DIK_0               0x0B
335 #define DIK_MINUS           0x0C    /* - on main keyboard */
336 #define DIK_EQUALS          0x0D
337 #define DIK_BACK            0x0E    /* backspace */
338 #define DIK_TAB             0x0F
339 #define DIK_Q               0x10
340 #define DIK_W               0x11
341 #define DIK_E               0x12
342 #define DIK_R               0x13
343 #define DIK_T               0x14
344 #define DIK_Y               0x15
345 #define DIK_U               0x16
346 #define DIK_I               0x17
347 #define DIK_O               0x18
348 #define DIK_P               0x19
349 #define DIK_LBRACKET        0x1A
350 #define DIK_RBRACKET        0x1B
351 #define DIK_RETURN          0x1C    /* Enter on main keyboard */
352 #define DIK_LCONTROL        0x1D
353 #define DIK_A               0x1E
354 #define DIK_S               0x1F
355 #define DIK_D               0x20
356 #define DIK_F               0x21
357 #define DIK_G               0x22
358 #define DIK_H               0x23
359 #define DIK_J               0x24
360 #define DIK_K               0x25
361 #define DIK_L               0x26
362 #define DIK_SEMICOLON       0x27
363 #define DIK_APOSTROPHE      0x28
364 #define DIK_GRAVE           0x29    /* accent grave */
365 #define DIK_LSHIFT          0x2A
366 #define DIK_BACKSLASH       0x2B
367 #define DIK_Z               0x2C
368 #define DIK_X               0x2D
369 #define DIK_C               0x2E
370 #define DIK_V               0x2F
371 #define DIK_B               0x30
372 #define DIK_N               0x31
373 #define DIK_M               0x32
374 #define DIK_COMMA           0x33
375 #define DIK_PERIOD          0x34    /* . on main keyboard */
376 #define DIK_SLASH           0x35    /* / on main keyboard */
377 #define DIK_RSHIFT          0x36
378 #define DIK_MULTIPLY        0x37    /* * on numeric keypad */
379 #define DIK_LMENU           0x38    /* left Alt */
380 #define DIK_SPACE           0x39
381 #define DIK_CAPITAL         0x3A
382 #define DIK_F1              0x3B
383 #define DIK_F2              0x3C
384 #define DIK_F3              0x3D
385 #define DIK_F4              0x3E
386 #define DIK_F5              0x3F
387 #define DIK_F6              0x40
388 #define DIK_F7              0x41
389 #define DIK_F8              0x42
390 #define DIK_F9              0x43
391 #define DIK_F10             0x44
392 #define DIK_NUMLOCK         0x45
393 #define DIK_SCROLL          0x46    /* Scroll Lock */
394 #define DIK_NUMPAD7         0x47
395 #define DIK_NUMPAD8         0x48
396 #define DIK_NUMPAD9         0x49
397 #define DIK_SUBTRACT        0x4A    /* - on numeric keypad */
398 #define DIK_NUMPAD4         0x4B
399 #define DIK_NUMPAD5         0x4C
400 #define DIK_NUMPAD6         0x4D
401 #define DIK_ADD             0x4E    /* + on numeric keypad */
402 #define DIK_NUMPAD1         0x4F
403 #define DIK_NUMPAD2         0x50
404 #define DIK_NUMPAD3         0x51
405 #define DIK_NUMPAD0         0x52
406 #define DIK_DECIMAL         0x53    /* . on numeric keypad */
407 #define DIK_F11             0x57
408 #define DIK_F12             0x58
409 #define DIK_F13             0x64    /*                     (NEC PC98) */
410 #define DIK_F14             0x65    /*                     (NEC PC98) */
411 #define DIK_F15             0x66    /*                     (NEC PC98) */
412 #define DIK_KANA            0x70    /* (Japanese keyboard)            */
413 #define DIK_CONVERT         0x79    /* (Japanese keyboard)            */
414 #define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */
415 #define DIK_YEN             0x7D    /* (Japanese keyboard)            */
416 #define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */
417 #define DIK_CIRCUMFLEX      0x90    /* (Japanese keyboard)            */
418 #define DIK_AT              0x91    /*                     (NEC PC98) */
419 #define DIK_COLON           0x92    /*                     (NEC PC98) */
420 #define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */
421 #define DIK_KANJI           0x94    /* (Japanese keyboard)            */
422 #define DIK_STOP            0x95    /*                     (NEC PC98) */
423 #define DIK_AX              0x96    /*                     (Japan AX) */
424 #define DIK_UNLABELED       0x97    /*                        (J3100) */
425 #define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */
426 #define DIK_RCONTROL        0x9D
427 #define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */
428 #define DIK_DIVIDE          0xB5    /* / on numeric keypad */
429 #define DIK_SYSRQ           0xB7
430 #define DIK_RMENU           0xB8    /* right Alt */
431 #define DIK_PAUSE           0xC5    /* Pause */
432 #define DIK_HOME            0xC7    /* Home on arrow keypad */
433 #define DIK_UP              0xC8    /* UpArrow on arrow keypad */
434 #define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */
435 #define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */
436 #define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */
437 #define DIK_END             0xCF    /* End on arrow keypad */
438 #define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */
439 #define DIK_NEXT            0xD1    /* PgDn on arrow keypad */
440 #define DIK_INSERT          0xD2    /* Insert on arrow keypad */
441 #define DIK_DELETE          0xD3    /* Delete on arrow keypad */
442 #define DIK_LWIN            0xDB    /* Left Windows key */
443 #define DIK_RWIN            0xDC    /* Right Windows key */
444 #define DIK_APPS            0xDD    /* AppMenu key */
445 #define DIK_POWER           0xDE
446 #define DIK_SLEEP           0xDF
447 #define DIK_BACKSPACE       DIK_BACK            /* backspace */
448 #define DIK_NUMPADSTAR      DIK_MULTIPLY        /* * on numeric keypad */
449 #define DIK_LALT            DIK_LMENU           /* left Alt */
450 #define DIK_CAPSLOCK        DIK_CAPITAL         /* CapsLock */
451 #define DIK_NUMPADMINUS     DIK_SUBTRACT        /* - on numeric keypad */
452 #define DIK_NUMPADPLUS      DIK_ADD             /* + on numeric keypad */
453 #define DIK_NUMPADPERIOD    DIK_DECIMAL         /* . on numeric keypad */
454 #define DIK_NUMPADSLASH     DIK_DIVIDE          /* / on numeric keypad */
455 #define DIK_RALT            DIK_RMENU           /* right Alt */
456 #define DIK_UPARROW         DIK_UP              /* UpArrow on arrow keypad */
457 #define DIK_PGUP            DIK_PRIOR           /* PgUp on arrow keypad */
458 #define DIK_LEFTARROW       DIK_LEFT            /* LeftArrow on arrow keypad */
459 #define DIK_RIGHTARROW      DIK_RIGHT           /* RightArrow on arrow keypad */
460 #define DIK_DOWNARROW       DIK_DOWN            /* DownArrow on arrow keypad */
461 #define DIK_PGDN            DIK_NEXT            /* PgDn on arrow keypad */
462
463 #define DIDFT_ALL               0x00000000
464 #define DIDFT_RELAXIS           0x00000001
465 #define DIDFT_ABSAXIS           0x00000002
466 #define DIDFT_AXIS              0x00000003
467 #define DIDFT_PSHBUTTON         0x00000004
468 #define DIDFT_TGLBUTTON         0x00000008
469 #define DIDFT_BUTTON            0x0000000C
470 #define DIDFT_POV               0x00000010
471 #define DIDFT_COLLECTION        0x00000040
472 #define DIDFT_NODATA            0x00000080
473 #define DIDFT_ANYINSTANCE       0x00FFFF00
474 #define DIDFT_INSTANCEMASK      DIDFT_ANYINSTANCE
475 #define DIDFT_MAKEINSTANCE(n)   ((WORD)(n) << 8)
476 #define DIDFT_GETTYPE(n)        LOBYTE(n)
477 #define DIDFT_GETINSTANCE(n)    LOWORD((n) >> 8)
478 #define DIDFT_FFACTUATOR        0x01000000
479 #define DIDFT_FFEFFECTTRIGGER   0x02000000
480 #define DIDFT_OUTPUT            0x10000000
481 #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
482 #define DIDFT_NOCOLLECTION      0x00FFFF00
483 #define DIDF_ABSAXIS            0x00000001
484 #define DIDF_RELAXIS            0x00000002
485
486 #define DIGDD_PEEK              0x00000001
487
488 typedef struct DIDEVICEOBJECTDATA {
489     DWORD       dwOfs;
490     DWORD       dwData;
491     DWORD       dwTimeStamp;
492     DWORD       dwSequence;
493 } DIDEVICEOBJECTDATA,*LPDIDEVICEOBJECTDATA;
494 typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
495
496 typedef struct _DIOBJECTDATAFORMAT {
497     const GUID *pguid;
498     DWORD       dwOfs;
499     DWORD       dwType;
500     DWORD       dwFlags;
501 } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
502
503 typedef struct {
504     DWORD                       dwSize;
505     DWORD                       dwObjSize;
506     DWORD                       dwFlags;
507     DWORD                       dwDataSize;
508     DWORD                       dwNumObjs;
509     LPDIOBJECTDATAFORMAT        rgodf;
510 } DIDATAFORMAT, *LPDIDATAFORMAT;
511 typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
512
513 typedef struct {
514     DWORD       dwSize;
515     DWORD       dwHeaderSize;
516     DWORD       dwObj;
517     DWORD       dwHow;
518 } DIPROPHEADER,*LPDIPROPHEADER;
519 typedef const DIPROPHEADER *LPCDIPROPHEADER;
520
521 #define DIPH_DEVICE     0
522 #define DIPH_BYOFFSET   1
523 #define DIPH_BYID       2
524 #define DIPH_BYUSAGE    3
525
526 #define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
527
528 typedef struct DIPROPDWORD {
529         DIPROPHEADER    diph;
530         DWORD           dwData;
531 } DIPROPDWORD, *LPDIPROPDWORD;
532 typedef const DIPROPDWORD *LPCDIPROPDWORD;
533
534 typedef struct DIPROPRANGE {
535         DIPROPHEADER    diph;
536         LONG            lMin;
537         LONG            lMax;
538 } DIPROPRANGE, *LPDIPROPRANGE;
539 typedef const DIPROPRANGE *LPCDIPROPRANGE;
540
541 #define DIPROPRANGE_NOMIN       ((LONG)0x80000000)
542 #define DIPROPRANGE_NOMAX       ((LONG)0x7FFFFFFF)
543
544 typedef struct DIPROPCAL {
545         DIPROPHEADER diph;
546         LONG    lMin;
547         LONG    lCenter;
548         LONG    lMax;
549 } DIPROPCAL, *LPDIPROPCAL;
550 typedef const DIPROPCAL *LPCDIPROPCAL;
551
552 typedef struct DIPROPGUIDANDPATH {
553         DIPROPHEADER diph;
554         GUID    guidClass;
555         WCHAR   wszPath[MAX_PATH];
556 } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
557 typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
558
559 /* special property GUIDs */
560 #ifdef __cplusplus
561 #define MAKEDIPROP(prop)        (*(const GUID *)(prop))
562 #else
563 #define MAKEDIPROP(prop)        ((REFGUID)(prop))
564 #endif
565 #define DIPROP_BUFFERSIZE       MAKEDIPROP(1)
566 #define DIPROP_AXISMODE         MAKEDIPROP(2)
567
568 #define DIPROPAXISMODE_ABS      0
569 #define DIPROPAXISMODE_REL      1
570
571 #define DIPROP_GRANULARITY      MAKEDIPROP(3)
572 #define DIPROP_RANGE            MAKEDIPROP(4)
573 #define DIPROP_DEADZONE         MAKEDIPROP(5)
574 #define DIPROP_SATURATION       MAKEDIPROP(6)
575 #define DIPROP_FFGAIN           MAKEDIPROP(7)
576 #define DIPROP_FFLOAD           MAKEDIPROP(8)
577 #define DIPROP_AUTOCENTER       MAKEDIPROP(9)
578
579 #define DIPROPAUTOCENTER_OFF    0
580 #define DIPROPAUTOCENTER_ON     1
581
582 #define DIPROP_CALIBRATIONMODE  MAKEDIPROP(10)
583
584 #define DIPROPCALIBRATIONMODE_COOKED    0
585 #define DIPROPCALIBRATIONMODE_RAW       1
586
587 #define DIPROP_CALIBRATION      MAKEDIPROP(11)
588 #define DIPROP_GUIDANDPATH      MAKEDIPROP(12)
589
590
591 typedef struct DIDEVCAPS {
592     DWORD       dwSize;
593     DWORD       dwFlags;
594     DWORD       dwDevType;
595     DWORD       dwAxes;
596     DWORD       dwButtons;
597     DWORD       dwPOVs;
598 #if(DIRECTINPUT_VERSION >= 0x0500)
599     DWORD       dwFFSamplePeriod;
600     DWORD       dwFFMinTimeResolution;
601     DWORD       dwFirmwareRevision;
602     DWORD       dwHardwareRevision;
603     DWORD       dwFFDriverVersion;
604 #endif /* DIRECTINPUT_VERSION >= 0x0500 */
605 } DIDEVCAPS,*LPDIDEVCAPS;
606
607 #define DIDC_ATTACHED           0x00000001
608 #define DIDC_POLLEDDEVICE       0x00000002
609 #define DIDC_EMULATED           0x00000004
610 #define DIDC_POLLEDDATAFORMAT   0x00000008
611 #define DIDC_FORCEFEEDBACK      0x00000100
612 #define DIDC_FFATTACK           0x00000200
613 #define DIDC_FFFADE             0x00000400
614 #define DIDC_SATURATION         0x00000800
615 #define DIDC_POSNEGCOEFFICIENTS 0x00001000
616 #define DIDC_POSNEGSATURATION   0x00002000
617 #define DIDC_DEADBAND           0x00004000
618
619 /* SetCooperativeLevel dwFlags */
620 #define DISCL_EXCLUSIVE         0x00000001
621 #define DISCL_NONEXCLUSIVE      0x00000002
622 #define DISCL_FOREGROUND        0x00000004
623 #define DISCL_BACKGROUND        0x00000008
624
625 typedef struct DICONSTANTFORCE {
626         LONG                    lMagnitude;
627 } DICONSTANTFORCE, *LPDICONSTANTFORCE;
628 typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
629
630 typedef struct DIRAMPFORCE {
631         LONG                    lStart;
632         LONG                    lEnd;
633 } DIRAMPFORCE, *LPDIRAMPFORCE;
634 typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
635
636 typedef struct DIPERIODIC {
637         DWORD                   dwMagnitude;
638         LONG                    lOffset;
639         DWORD                   dwPhase;
640         DWORD                   dwPeriod;
641 } DIPERIODIC, *LPDIPERIODIC;
642 typedef const DIPERIODIC *LPCDIPERIODIC;
643
644 typedef struct DICONDITION {
645         LONG                    lOffset;
646         LONG                    lPositiveCoefficient;
647         LONG                    lNegativeCoefficient;
648         DWORD                   dwPositiveSaturation;
649         DWORD                   dwNegativeSaturation;
650         LONG                    lDeadBand;
651 } DICONDITION, *LPDICONDITION;
652 typedef const DICONDITION *LPCDICONDITION;
653
654 typedef struct DICUSTOMFORCE {
655         DWORD                   cChannels;
656         DWORD                   dwSamplePeriod;
657         DWORD                   cSamples;
658         LPLONG                  rglForceData;
659 } DICUSTOMFORCE, *LPDICUSTOMFORCE;
660 typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
661
662 typedef struct DIENVELOPE {
663         DWORD                   dwSize;
664         DWORD                   dwAttackLevel;
665         DWORD                   dwAttackTime;
666         DWORD                   dwFadeLevel;
667         DWORD                   dwFadeTime;
668 } DIENVELOPE, *LPDIENVELOPE;
669 typedef const DIENVELOPE *LPCDIENVELOPE;
670
671 typedef struct DIEFFECT {
672         DWORD                   dwSize;
673         DWORD                   dwFlags;
674         DWORD                   dwDuration;
675         DWORD                   dwSamplePeriod;
676         DWORD                   dwGain;
677         DWORD                   dwTriggerButton;
678         DWORD                   dwTriggerRepeatInterval;
679         DWORD                   cAxes;
680         LPDWORD                 rgdwAxes;
681         LPLONG                  rglDirection;
682         LPDIENVELOPE            lpEnvelope;
683         DWORD                   cbTypeSpecificParams;
684         LPVOID                  lpvTypeSpecificParams;
685 } DIEFFECT, *LPDIEFFECT;
686 typedef const DIEFFECT *LPCDIEFFECT;
687
688 typedef struct DIEFFECTINFOA {
689         DWORD                   dwSize;
690         GUID                    guid;
691         DWORD                   dwEffType;
692         DWORD                   dwStaticParams;
693         DWORD                   dwDynamicParams;
694         CHAR                    tszName[MAX_PATH];
695 } DIEFFECTINFOA, *LPDIEFFECTINFOA;
696 typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
697
698 typedef struct DIEFFECTINFOW {
699         DWORD                   dwSize;
700         GUID                    guid;
701         DWORD                   dwEffType;
702         DWORD                   dwStaticParams;
703         DWORD                   dwDynamicParams;
704         WCHAR                   tszName[MAX_PATH];
705 } DIEFFECTINFOW, *LPDIEFFECTINFOW;
706 typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
707
708 DECL_WINELIB_TYPE_AW(DIEFFECTINFO)
709 DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)
710 DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)
711
712 typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
713 typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
714
715 typedef struct DIEFFESCAPE {
716         DWORD   dwSize;
717         DWORD   dwCommand;
718         LPVOID  lpvInBuffer;
719         DWORD   cbInBuffer;
720         LPVOID  lpvOutBuffer;
721         DWORD   cbOutBuffer;
722 } DIEFFESCAPE, *LPDIEFFESCAPE;
723
724 typedef struct DIJOYSTATE {
725         LONG    lX;
726         LONG    lY;
727         LONG    lZ;
728         LONG    lRx;
729         LONG    lRy;
730         LONG    lRz;
731         LONG    rglSlider[2];
732         DWORD   rgdwPOV[4];
733         BYTE    rgbButtons[32];
734 } DIJOYSTATE, *LPDIJOYSTATE;
735
736 typedef struct DIJOYSTATE2 {
737         LONG    lX;
738         LONG    lY;
739         LONG    lZ;
740         LONG    lRx;
741         LONG    lRy;
742         LONG    lRz;
743         LONG    rglSlider[2];
744         DWORD   rgdwPOV[4];
745         BYTE    rgbButtons[128];
746         LONG    lVX;            /* 'v' as in velocity */
747         LONG    lVY;
748         LONG    lVZ;
749         LONG    lVRx;
750         LONG    lVRy;
751         LONG    lVRz;
752         LONG    rglVSlider[2];
753         LONG    lAX;            /* 'a' as in acceleration */
754         LONG    lAY;
755         LONG    lAZ;
756         LONG    lARx;
757         LONG    lARy;
758         LONG    lARz;
759         LONG    rglASlider[2];
760         LONG    lFX;            /* 'f' as in force */
761         LONG    lFY;
762         LONG    lFZ;
763         LONG    lFRx;           /* 'fr' as in rotational force aka torque */
764         LONG    lFRy;
765         LONG    lFRz;
766         LONG    rglFSlider[2];
767 } DIJOYSTATE2, *LPDIJOYSTATE2;
768
769 #define DIJOFS_X                FIELD_OFFSET(DIJOYSTATE, lX)
770 #define DIJOFS_Y                FIELD_OFFSET(DIJOYSTATE, lY)
771 #define DIJOFS_Z                FIELD_OFFSET(DIJOYSTATE, lZ)
772 #define DIJOFS_RX               FIELD_OFFSET(DIJOYSTATE, lRx)
773 #define DIJOFS_RY               FIELD_OFFSET(DIJOYSTATE, lRy)
774 #define DIJOFS_RZ               FIELD_OFFSET(DIJOYSTATE, lRz)
775 #define DIJOFS_SLIDER(n)        (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
776                                                         (n) * sizeof(LONG))
777 #define DIJOFS_POV(n)           (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
778                                                         (n) * sizeof(DWORD))
779 #define DIJOFS_BUTTON(n)        (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
780 #define DIJOFS_BUTTON0          DIJOFS_BUTTON(0)
781 #define DIJOFS_BUTTON1          DIJOFS_BUTTON(1)
782 #define DIJOFS_BUTTON2          DIJOFS_BUTTON(2)
783 #define DIJOFS_BUTTON3          DIJOFS_BUTTON(3)
784 #define DIJOFS_BUTTON4          DIJOFS_BUTTON(4)
785 #define DIJOFS_BUTTON5          DIJOFS_BUTTON(5)
786 #define DIJOFS_BUTTON6          DIJOFS_BUTTON(6)
787 #define DIJOFS_BUTTON7          DIJOFS_BUTTON(7)
788 #define DIJOFS_BUTTON8          DIJOFS_BUTTON(8)
789 #define DIJOFS_BUTTON9          DIJOFS_BUTTON(9)
790 #define DIJOFS_BUTTON10         DIJOFS_BUTTON(10)
791 #define DIJOFS_BUTTON11         DIJOFS_BUTTON(11)
792 #define DIJOFS_BUTTON12         DIJOFS_BUTTON(12)
793 #define DIJOFS_BUTTON13         DIJOFS_BUTTON(13)
794 #define DIJOFS_BUTTON14         DIJOFS_BUTTON(14)
795 #define DIJOFS_BUTTON15         DIJOFS_BUTTON(15)
796 #define DIJOFS_BUTTON16         DIJOFS_BUTTON(16)
797 #define DIJOFS_BUTTON17         DIJOFS_BUTTON(17)
798 #define DIJOFS_BUTTON18         DIJOFS_BUTTON(18)
799 #define DIJOFS_BUTTON19         DIJOFS_BUTTON(19)
800 #define DIJOFS_BUTTON20         DIJOFS_BUTTON(20)
801 #define DIJOFS_BUTTON21         DIJOFS_BUTTON(21)
802 #define DIJOFS_BUTTON22         DIJOFS_BUTTON(22)
803 #define DIJOFS_BUTTON23         DIJOFS_BUTTON(23)
804 #define DIJOFS_BUTTON24         DIJOFS_BUTTON(24)
805 #define DIJOFS_BUTTON25         DIJOFS_BUTTON(25)
806 #define DIJOFS_BUTTON26         DIJOFS_BUTTON(26)
807 #define DIJOFS_BUTTON27         DIJOFS_BUTTON(27)
808 #define DIJOFS_BUTTON28         DIJOFS_BUTTON(28)
809 #define DIJOFS_BUTTON29         DIJOFS_BUTTON(29)
810 #define DIJOFS_BUTTON30         DIJOFS_BUTTON(30)
811 #define DIJOFS_BUTTON31         DIJOFS_BUTTON(31)
812
813 /* DInput 7 structures, types */
814 typedef struct DIFILEEFFECT {
815   DWORD       dwSize;
816   GUID        GuidEffect;
817   LPCDIEFFECT lpDiEffect;
818   CHAR        szFriendlyName[MAX_PATH];
819 } DIFILEEFFECT, *LPDIFILEEFFECT;
820
821 typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
822 typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
823
824 /* DInput 8 structures and types */
825 #if DIRECTINPUT_VERSION >= 0x0800
826 typedef struct _DIACTIONA {
827         UINT_PTR        uAppData;
828         DWORD           dwSemantics;
829         DWORD           dwFlags;
830         union {
831                 LPCSTR  lptszActionName;
832                 UINT    uResIdString;
833         } DUMMYUNIONNAME;
834         GUID            guidInstance;
835         DWORD           dwObjID;
836         DWORD           dwHow;
837 } DIACTIONA, *LPDIACTIONA;
838 typedef const DIACTIONA *LPCDIACTIONA;
839
840 typedef struct _DIACTIONW {
841         UINT_PTR        uAppData;
842         DWORD           dwSemantics;
843         DWORD           dwFlags;
844         union {
845                 LPCWSTR lptszActionName;
846                 UINT    uResIdString;
847         } DUMMYUNIONNAME;
848         GUID            guidInstance;
849         DWORD           dwObjID;
850         DWORD           dwHow;
851 } DIACTIONW, *LPDIACTIONW;
852 typedef const DIACTIONW *LPCDIACTIONW;
853
854 DECL_WINELIB_TYPE_AW(DIACTION)
855 DECL_WINELIB_TYPE_AW(LPDIACTION)
856 DECL_WINELIB_TYPE_AW(LPCDIACTION)
857
858 #define DIA_FORCEFEEDBACK       0x00000001
859 #define DIA_APPMAPPED           0x00000002
860 #define DIA_APPNOMAP            0x00000004
861 #define DIA_NORANGE             0x00000008
862 #define DIA_APPFIXED            0x00000010
863
864 #define DIAH_UNMAPPED           0x00000000
865 #define DIAH_USERCONFIG         0x00000001
866 #define DIAH_APPREQUESTED       0x00000002
867 #define DIAH_HWAPP              0x00000004
868 #define DIAH_HWDEFAULT          0x00000008
869 #define DIAH_DEFAULT            0x00000020
870 #define DIAH_ERROR              0x80000000
871
872 typedef struct _DIACTIONFORMATA {
873         DWORD           dwSize;
874         DWORD           dwActionSize;
875         DWORD           dwDataSize;
876         DWORD           dwNumActions;
877         LPDIACTIONA     rgoAction;
878         GUID            guidActionMap;
879         DWORD           dwGenre;
880         DWORD           dwBufferSize;
881         LONG            lAxisMin;
882         LONG            lAxisMax;
883         HINSTANCE       hInstString;
884         FILETIME        ftTimeStamp;
885         DWORD           dwCRC;
886         CHAR            tszActionMap[MAX_PATH];
887 } DIACTIONFORMATA, *LPDIACTIONFORMATA;
888 typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
889
890 typedef struct _DIACTIONFORMATW {
891         DWORD           dwSize;
892         DWORD           dwActionSize;
893         DWORD           dwDataSize;
894         DWORD           dwNumActions;
895         LPDIACTIONW     rgoAction;
896         GUID            guidActionMap;
897         DWORD           dwGenre;
898         DWORD           dwBufferSize;
899         LONG            lAxisMin;
900         LONG            lAxisMax;
901         HINSTANCE       hInstString;
902         FILETIME        ftTimeStamp;
903         DWORD           dwCRC;
904         WCHAR           tszActionMap[MAX_PATH];
905 } DIACTIONFORMATW, *LPDIACTIONFORMATW;
906 typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
907
908 DECL_WINELIB_TYPE_AW(DIACTIONFORMAT)
909 DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)
910 DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)
911
912 #define DIAFTS_NEWDEVICELOW     0xFFFFFFFF
913 #define DIAFTS_NEWDEVICEHIGH    0xFFFFFFFF
914 #define DIAFTS_UNUSEDDEVICELOW  0x00000000
915 #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
916
917 #define DIDBAM_DEFAULT          0x00000000
918 #define DIDBAM_PRESERVE         0x00000001
919 #define DIDBAM_INITIALIZE       0x00000002
920 #define DIDBAM_HWDEFAULTS       0x00000004
921
922 #define DIDSAM_DEFAULT          0x00000000
923 #define DIDSAM_NOUSER           0x00000001
924 #define DIDSAM_FORCESAVE        0x00000002
925
926 #define DICD_DEFAULT            0x00000000
927 #define DICD_EDIT               0x00000001
928
929 #ifndef D3DCOLOR_DEFINED
930 typedef DWORD D3DCOLOR;
931 #define D3DCOLOR_DEFINED
932 #endif
933
934 typedef struct _DICOLORSET {
935         DWORD           dwSize;
936         D3DCOLOR        cTextFore;
937         D3DCOLOR        cTextHighlight;
938         D3DCOLOR        cCalloutLine;
939         D3DCOLOR        cCalloutHighlight;
940         D3DCOLOR        cBorder;
941         D3DCOLOR        cControlFill;
942         D3DCOLOR        cHighlightFill;
943         D3DCOLOR        cAreaFill;
944 } DICOLORSET, *LPDICOLORSET;
945 typedef const DICOLORSET *LPCDICOLORSET;
946
947 typedef struct _DICONFIGUREDEVICESPARAMSA {
948         DWORD                   dwSize;
949         DWORD                   dwcUsers;
950         LPSTR                   lptszUserNames;
951         DWORD                   dwcFormats;
952         LPDIACTIONFORMATA       lprgFormats;
953         HWND                    hwnd;
954         DICOLORSET              dics;
955         LPUNKNOWN               lpUnkDDSTarget;
956 } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
957 typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
958
959 typedef struct _DICONFIGUREDEVICESPARAMSW {
960         DWORD                   dwSize;
961         DWORD                   dwcUsers;
962         LPWSTR                  lptszUserNames;
963         DWORD                   dwcFormats;
964         LPDIACTIONFORMATW       lprgFormats;
965         HWND                    hwnd;
966         DICOLORSET              dics;
967         LPUNKNOWN               lpUnkDDSTarget;
968 } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
969 typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
970
971 DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)
972 DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)
973 DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)
974
975 #define DIDIFT_CONFIGURATION    0x00000001
976 #define DIDIFT_OVERLAY          0x00000002
977
978 #define DIDAL_CENTERED          0x00000000
979 #define DIDAL_LEFTALIGNED       0x00000001
980 #define DIDAL_RIGHTALIGNED      0x00000002
981 #define DIDAL_MIDDLE            0x00000000
982 #define DIDAL_TOPALIGNED        0x00000004
983 #define DIDAL_BOTTOMALIGNED     0x00000008
984
985 typedef struct _DIDEVICEIMAGEINFOA {
986         CHAR    tszImagePath[MAX_PATH];
987         DWORD   dwFlags;
988         DWORD   dwViewID;
989         RECT    rcOverlay;
990         DWORD   dwObjID;
991         DWORD   dwcValidPts;
992         POINT   rgptCalloutLine[5];
993         RECT    rcCalloutRect;
994         DWORD   dwTextAlign;
995 } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
996 typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
997
998 typedef struct _DIDEVICEIMAGEINFOW {
999         WCHAR   tszImagePath[MAX_PATH];
1000         DWORD   dwFlags;
1001         DWORD   dwViewID;
1002         RECT    rcOverlay;
1003         DWORD   dwObjID;
1004         DWORD   dwcValidPts;
1005         POINT   rgptCalloutLine[5];
1006         RECT    rcCalloutRect;
1007         DWORD   dwTextAlign;
1008 } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
1009 typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
1010
1011 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)
1012 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)
1013 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)
1014
1015 typedef struct _DIDEVICEIMAGEINFOHEADERA {
1016         DWORD   dwSize;
1017         DWORD   dwSizeImageInfo;
1018         DWORD   dwcViews;
1019         DWORD   dwcButtons;
1020         DWORD   dwcAxes;
1021         DWORD   dwcPOVs;
1022         DWORD   dwBufferSize;
1023         DWORD   dwBufferUsed;
1024         LPDIDEVICEIMAGEINFOA    lprgImageInfoArray;
1025 } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
1026 typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
1027
1028 typedef struct _DIDEVICEIMAGEINFOHEADERW {
1029         DWORD   dwSize;
1030         DWORD   dwSizeImageInfo;
1031         DWORD   dwcViews;
1032         DWORD   dwcButtons;
1033         DWORD   dwcAxes;
1034         DWORD   dwcPOVs;
1035         DWORD   dwBufferSize;
1036         DWORD   dwBufferUsed;
1037         LPDIDEVICEIMAGEINFOW    lprgImageInfoArray;
1038 } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
1039 typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
1040
1041 DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)
1042 DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)
1043 DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)
1044
1045 #endif /* DI8 */
1046
1047
1048 /*****************************************************************************
1049  * IDirectInputEffect interface
1050  */
1051 #define INTERFACE IDirectInputEffect
1052 #define IDirectInputEffect_METHODS \
1053     IUnknown_METHODS \
1054     STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE; \
1055     STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE; \
1056     STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE; \
1057     STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE; \
1058     STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE; \
1059     STDMETHOD(Stop)(THIS) PURE; \
1060     STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE; \
1061     STDMETHOD(Download)(THIS) PURE; \
1062     STDMETHOD(Unload)(THIS) PURE; \
1063     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
1064 ICOM_DEFINE(IDirectInputEffect,IUnknown)
1065 #undef INTERFACE
1066
1067 #ifdef COBJMACROS
1068     /*** IUnknown methods ***/
1069 #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1070 #define IDirectInputEffect_AddRef(p)             (p)->lpVtbl->AddRef(p)
1071 #define IDirectInputEffect_Release(p)            (p)->lpVtbl->Release(p)
1072     /*** IDirectInputEffect methods ***/
1073 #define IDirectInputEffect_Initialize(p,a,b,c)    (p)->lpVtbl->Initialize(p,a,b,c)
1074 #define IDirectInputEffect_GetEffectGuid(p,a)     (p)->lpVtbl->GetEffectGuid(p,a)
1075 #define IDirectInputEffect_GetParameters(p,a,b)   (p)->lpVtbl->GetParameters(p,a,b)
1076 #define IDirectInputEffect_SetParameters(p,a,b)   (p)->lpVtbl->SetParameters(p,a,b)
1077 #define IDirectInputEffect_Start(p,a,b)           (p)->lpVtbl->Start(p,a,b)
1078 #define IDirectInputEffect_Stop(p)                (p)->lpVtbl->Stop(p)
1079 #define IDirectInputEffect_GetEffectStatus(p,a,b) (p)->lpVtbl->GetEffectStatus(p,a)
1080 #define IDirectInputEffect_Download(p)            (p)->lpVtbl->Download(p)
1081 #define IDirectInputEffect_Unload(p)              (p)->lpVtbl->Unload(p)
1082 #define IDirectInputEffect_Escape(p,a)            (p)->lpVtbl->Escape(p,a)
1083 #endif
1084
1085
1086 /*****************************************************************************
1087  * IDirectInputDeviceA interface
1088  */
1089 #define INTERFACE IDirectInputDeviceA
1090 #define IDirectInputDeviceA_METHODS \
1091     IUnknown_METHODS \
1092     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE; \
1093     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1094     STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE; \
1095     STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE; \
1096     STDMETHOD(Acquire)(THIS) PURE; \
1097     STDMETHOD(Unacquire)(THIS) PURE; \
1098     STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE; \
1099     STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE; \
1100     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE; \
1101     STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE; \
1102     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE; \
1103     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE; \
1104     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE; \
1105     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1106     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
1107 ICOM_DEFINE(IDirectInputDeviceA,IUnknown)
1108 #undef INTERFACE
1109
1110 #ifdef COBJMACROS
1111     /*** IUnknown methods ***/
1112 #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1113 #define IDirectInputDevice_AddRef(p)             (p)->lpVtbl->AddRef(p)
1114 #define IDirectInputDevice_Release(p)            (p)->lpVtbl->Release(p)
1115 /*** IDirectInputDevice methods ***/
1116 #define IDirectInputDevice_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
1117 #define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
1118 #define IDirectInputDevice_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
1119 #define IDirectInputDevice_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
1120 #define IDirectInputDevice_Acquire(p)                 (p)->lpVtbl->Acquire(p)
1121 #define IDirectInputDevice_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
1122 #define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
1123 #define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1124 #define IDirectInputDevice_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
1125 #define IDirectInputDevice_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
1126 #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1127 #define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1128 #define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
1129 #define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
1130 #define IDirectInputDevice_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
1131 #endif
1132
1133
1134 /*****************************************************************************
1135  * IDirectInputDevice2A interface
1136  */
1137 #define INTERFACE IDirectInputDevice2A
1138 #define IDirectInputDevice2A_METHODS \
1139     IDirectInputDeviceA_METHODS \
1140     STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE; \
1141     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE; \
1142     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE; \
1143     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE; \
1144     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE; \
1145     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE; \
1146     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE; \
1147     STDMETHOD(Poll)(THIS) PURE; \
1148     STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
1149 ICOM_DEFINE(IDirectInputDevice2A,IDirectInputDeviceA)
1150 #undef INTERFACE
1151
1152 #ifdef COBJMACROS
1153 /*** IUnknown methods ***/
1154 #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1155 #define IDirectInputDevice2_AddRef(p)             (p)->lpVtbl->AddRef(p)
1156 #define IDirectInputDevice2_Release(p)            (p)->lpVtbl->Release(p)
1157 /*** IDirectInputDevice methods ***/
1158 #define IDirectInputDevice2_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
1159 #define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
1160 #define IDirectInputDevice2_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
1161 #define IDirectInputDevice2_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
1162 #define IDirectInputDevice2_Acquire(p)                 (p)->lpVtbl->Acquire(p)
1163 #define IDirectInputDevice2_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
1164 #define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
1165 #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1166 #define IDirectInputDevice2_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
1167 #define IDirectInputDevice2_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
1168 #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1169 #define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1170 #define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
1171 #define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
1172 #define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
1173 /*** IDirectInputDevice2 methods ***/
1174 #define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1175 #define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
1176 #define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
1177 #define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
1178 #define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1179 #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1180 #define IDirectInputDevice2_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
1181 #define IDirectInputDevice2_Poll(p)                           (p)->lpVtbl->Poll(p)
1182 #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1183 #endif
1184
1185 #if DIRECTINPUT_VERSION >= 0x0700
1186 /*****************************************************************************
1187  * IDirectInputDevice7A interface
1188  */
1189 #define INTERFACE IDirectInputDevice7A
1190 #define IDirectInputDevice7A_METHODS \
1191     IDirectInputDevice2A_METHODS \
1192     STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE; \
1193     STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
1194 ICOM_DEFINE(IDirectInputDevice7A,IDirectInputDevice2A)
1195 #undef INTERFACE
1196
1197 #ifdef COBJMACROS
1198 /*** IUnknown methods ***/
1199 #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1200 #define IDirectInputDevice7_AddRef(p)             (p)->lpVtbl->AddRef(p)
1201 #define IDirectInputDevice7_Release(p)            (p)->lpVtbl->Release(p)
1202 /*** IDirectInputDevice methods ***/
1203 #define IDirectInputDevice7_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
1204 #define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
1205 #define IDirectInputDevice7_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
1206 #define IDirectInputDevice7_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
1207 #define IDirectInputDevice7_Acquire(p)                 (p)->lpVtbl->Acquire(p)
1208 #define IDirectInputDevice7_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
1209 #define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
1210 #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1211 #define IDirectInputDevice7_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
1212 #define IDirectInputDevice7_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
1213 #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1214 #define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1215 #define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
1216 #define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
1217 #define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
1218 /*** IDirectInputDevice2 methods ***/
1219 #define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1220 #define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
1221 #define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
1222 #define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
1223 #define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1224 #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1225 #define IDirectInputDevice7_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
1226 #define IDirectInputDevice7_Poll(p)                           (p)->lpVtbl->Poll(p)
1227 #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1228 /*** IDirectInputDevice7 methods ***/
1229 #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1230 #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1231 #endif
1232
1233 #endif /* DI7 */
1234
1235 #if DIRECTINPUT_VERSION >= 0x0800
1236 /*****************************************************************************
1237  * IDirectInputDevice8A interface
1238  */
1239 #define INTERFACE IDirectInputDevice8A
1240 #define IDirectInputDevice8A_METHODS \
1241     IDirectInputDevice7A_METHODS \
1242     STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; \
1243     STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE; \
1244     STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
1245 ICOM_DEFINE(IDirectInputDevice8A,IDirectInputDevice7A)
1246 #undef INTERFACE
1247
1248 #ifdef COBJMACROS
1249 /*** IUnknown methods ***/
1250 #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1251 #define IDirectInputDevice8_AddRef(p)             (p)->lpVtbl->AddRef(p)
1252 #define IDirectInputDevice8_Release(p)            (p)->lpVtbl->Release(p)
1253 /*** IDirectInputDevice methods ***/
1254 #define IDirectInputDevice8_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
1255 #define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
1256 #define IDirectInputDevice8_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
1257 #define IDirectInputDevice8_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
1258 #define IDirectInputDevice8_Acquire(p)                 (p)->lpVtbl->Acquire(p)
1259 #define IDirectInputDevice8_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
1260 #define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
1261 #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
1262 #define IDirectInputDevice8_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
1263 #define IDirectInputDevice8_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
1264 #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
1265 #define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
1266 #define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
1267 #define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
1268 #define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
1269 /*** IDirectInputDevice2 methods ***/
1270 #define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
1271 #define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
1272 #define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
1273 #define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
1274 #define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
1275 #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
1276 #define IDirectInputDevice8_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
1277 #define IDirectInputDevice8_Poll(p)                           (p)->lpVtbl->Poll(p)
1278 #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
1279 /*** IDirectInputDevice7 methods ***/
1280 #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
1281 #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
1282 /*** IDirectInputDevice8 methods ***/
1283 #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
1284 #define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->lpVtbl->SetActionMap(p,a,b,c)
1285 #define IDirectInputDevice8_GetImageInfo(p,a)       (p)->lpVtbl->GetImageInfo(p,a)
1286 #endif
1287
1288 #endif /* DI8 */
1289
1290 /* "Standard" Mouse report... */
1291 typedef struct DIMOUSESTATE {
1292   LONG lX;
1293   LONG lY;
1294   LONG lZ;
1295   BYTE rgbButtons[4];
1296 } DIMOUSESTATE;
1297
1298 /* "Standard" Mouse report for DInput 7... */
1299 typedef struct DIMOUSESTATE2 {
1300   LONG lX;
1301   LONG lY;
1302   LONG lZ;
1303   BYTE rgbButtons[8];
1304 } DIMOUSESTATE2;
1305
1306 #define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)
1307 #define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)
1308 #define DIMOFS_Z        FIELD_OFFSET(DIMOUSESTATE, lZ)
1309 #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
1310 #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
1311 #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
1312 #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
1313
1314 #ifdef __cplusplus
1315 extern "C" {
1316 #endif
1317 extern const DIDATAFORMAT c_dfDIMouse;
1318 extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
1319 extern const DIDATAFORMAT c_dfDIKeyboard;
1320 extern const DIDATAFORMAT c_dfDIJoystick;
1321 extern const DIDATAFORMAT c_dfDIJoystick2;
1322 #ifdef __cplusplus
1323 };
1324 #endif
1325
1326 /*****************************************************************************
1327  * IDirectInputA interface
1328  */
1329 #define INTERFACE IDirectInputA
1330 #define IDirectInputA_METHODS \
1331     IUnknown_METHODS \
1332     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1333     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1334     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1335     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1336     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
1337 ICOM_DEFINE(IDirectInputA,IUnknown)
1338 #undef INTERFACE
1339
1340 #ifdef COBJMACROS
1341 /*** IUnknown methods ***/
1342 #define IDirectInputA_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1343 #define IDirectInputA_AddRef(p)             (p)->lpVtbl->AddRef(p)
1344 #define IDirectInputA_Release(p)            (p)->lpVtbl->Release(p)
1345         /*** IDirectInputA methods ***/
1346 #define IDirectInputA_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
1347 #define IDirectInputA_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1348 #define IDirectInputA_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
1349 #define IDirectInputA_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1350 #define IDirectInputA_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
1351 #endif
1352
1353 /*****************************************************************************
1354  * IDirectInput2A interface
1355  */
1356 #define INTERFACE IDirectInput2A
1357 #define IDirectInput2A_METHODS \
1358     IDirectInputA_METHODS \
1359     STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
1360 ICOM_DEFINE(IDirectInput2A,IDirectInputA)
1361 #undef INTERFACE
1362
1363 #ifdef COBJMACROS
1364 /*** IUnknown methods ***/
1365 #define IDirectInput2A_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1366 #define IDirectInput2A_AddRef(p)             (p)->lpVtbl->AddRef(p)
1367 #define IDirectInput2A_Release(p)            (p)->lpVtbl->Release(p)
1368         /*** IDirectInputA methods ***/
1369 #define IDirectInput2A_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
1370 #define IDirectInput2A_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1371 #define IDirectInput2A_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
1372 #define IDirectInput2A_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1373 #define IDirectInput2A_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
1374         /*** IDirectInput2A methods ***/
1375 #define IDirectInput2A_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
1376 #endif
1377
1378 #if DIRECTINPUT_VERSION >= 0x0700
1379 /*****************************************************************************
1380  * IDirectInput7A interface
1381  */
1382 #define INTERFACE IDirectInput7A
1383 #define IDirectInput7A_METHODS \
1384     IDirectInput2A_METHODS \
1385     STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
1386 ICOM_DEFINE(IDirectInput7A,IDirectInput2A)
1387 #undef INTERFACE
1388
1389 #ifdef COBJMACROS
1390 /*** IUnknown methods ***/
1391 #define IDirectInput7A_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1392 #define IDirectInput7A_AddRef(p)             (p)->lpVtbl->AddRef(p)
1393 #define IDirectInput7A_Release(p)            (p)->lpVtbl->Release(p)
1394         /*** IDirectInputA methods ***/
1395 #define IDirectInput7A_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
1396 #define IDirectInput7A_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1397 #define IDirectInput7A_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
1398 #define IDirectInput7A_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
1399 #define IDirectInput7A_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
1400         /*** IDirectInput2A methods ***/
1401 #define IDirectInput7A_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
1402         /*** IDirectInput7A methods ***/
1403 #define IDirectInput7A_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
1404 #endif
1405
1406 #endif /* DI7 */
1407
1408 #if DIRECTINPUT_VERSION >= 0x0800
1409 /*****************************************************************************
1410  * IDirectInput8A interface
1411  */
1412 #define INTERFACE IDirectInput8A
1413 #define IDirectInput8A_METHODS \
1414     IUnknown_METHODS \
1415     STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE; \
1416     STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1417     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE; \
1418     STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE; \
1419     STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE; \
1420     STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE; \
1421     STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE; \
1422     STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
1423 ICOM_DEFINE(IDirectInput8A,IUnknown)
1424 #undef INTERFACE
1425
1426 #ifdef COBJMACROS
1427 /*** IUnknown methods ***/
1428 #define IDirectInput8A_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1429 #define IDirectInput8A_AddRef(p)             (p)->lpVtbl->AddRef(p)
1430 #define IDirectInput8A_Release(p)            (p)->lpVtbl->Release(p)
1431       /*** IDirectInput8A methods ***/
1432 #define IDirectInput8A_CreateDevice(p,a,b,c)       (p)->lpVtbl->CreateDevice(p,a,b,c)
1433 #define IDirectInput8A_EnumDevices(p,a,b,c,d)      (p)->lpVtbl->EnumDevices(p,a,b,c,d)
1434 #define IDirectInput8A_GetDeviceStatus(p,a)        (p)->lpVtbl->GetDeviceStatus(p,a)
1435 #define IDirectInput8A_RunControlPanel(p,a,b)      (p)->lpVtbl->RunControlPanel(p,a,b)
1436 #define IDirectInput8A_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
1437 #define IDirectInput8A_FindDevice(p,a,b,c)         (p)->lpVtbl->FindDevice(p,a,b,c)
1438 #define IDirectInput8A_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
1439 #define IDirectInput8A_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
1440 #endif
1441
1442 #endif /* DI8 */
1443
1444 /* Export functions */
1445
1446 #ifdef __cplusplus
1447 extern "C" {
1448 #endif
1449
1450 #if DIRECTINPUT_VERSION >= 0x0800
1451 HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
1452 #endif
1453
1454 HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
1455 HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
1456 #define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
1457
1458 HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
1459
1460 #ifdef __cplusplus
1461 };
1462 #endif
1463
1464 #endif /* __WINE_DINPUT_H */