push aea352fc3df615e3f4b48daf6f897ea93ad1fffd
[wine/hacks.git] / dlls / dinput / keyboard.c
blobad44023f5865fb622cf74ccd6f086ad945f3cb8c
1 /* DirectInput Keyboard device
3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998,1999 Lionel Ulmer
5 * Copyright 2000-2001 TransGaming Technologies Inc.
6 * Copyright 2005 Raphael Junqueira
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "config.h"
24 #include "wine/port.h"
26 #include <stdarg.h>
27 #include <string.h>
28 #include "windef.h"
29 #include "winbase.h"
30 #include "winuser.h"
31 #include "winerror.h"
32 #include "dinput.h"
34 #include "dinput_private.h"
35 #include "device_private.h"
36 #include "wine/debug.h"
37 #include "wine/unicode.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(dinput);
41 #define WINE_DINPUT_KEYBOARD_MAX_KEYS 256
43 static const IDirectInputDevice8AVtbl SysKeyboardAvt;
44 static const IDirectInputDevice8WVtbl SysKeyboardWvt;
46 typedef struct SysKeyboardImpl SysKeyboardImpl;
47 struct SysKeyboardImpl
49 struct IDirectInputDevice2AImpl base;
50 BYTE DInputKeyState[WINE_DINPUT_KEYBOARD_MAX_KEYS];
53 static SysKeyboardImpl* current_lock = NULL;
54 /* Today's acquired device
55 * FIXME: currently this can be only one.
56 * Maybe this should be a linked list or st.
57 * I don't know what the rules are for multiple acquired keyboards,
58 * but 'DI_LOSTFOCUS' and 'DI_UNACQUIRED' exist for a reason.
61 static LRESULT CALLBACK KeyboardCallback( int code, WPARAM wparam, LPARAM lparam )
63 SysKeyboardImpl *This = (SysKeyboardImpl *)current_lock;
64 int dik_code;
65 KBDLLHOOKSTRUCT *hook = (KBDLLHOOKSTRUCT *)lparam;
66 BYTE new_diks;
68 TRACE("(%d,%ld,%ld)\n", code, wparam, lparam);
70 /* returns now if not HC_ACTION */
71 if (code != HC_ACTION) return CallNextHookEx(0, code, wparam, lparam);
73 dik_code = hook->scanCode & 0xff;
74 if (hook->flags & LLKHF_EXTENDED) dik_code |= 0x80;
76 new_diks = hook->flags & LLKHF_UP ? 0 : 0x80;
78 /* returns now if key event already known */
79 if (new_diks == This->DInputKeyState[dik_code])
80 return CallNextHookEx(0, code, wparam, lparam);
82 This->DInputKeyState[dik_code] = new_diks;
83 TRACE(" setting %02X to %02X\n", dik_code, This->DInputKeyState[dik_code]);
85 dik_code = id_to_offset(&This->base.data_format, DIDFT_MAKEINSTANCE(dik_code) | DIDFT_PSHBUTTON);
86 EnterCriticalSection(&This->base.crit);
87 queue_event((LPDIRECTINPUTDEVICE8A)This, dik_code, new_diks, hook->time, This->base.dinput->evsequence++);
88 LeaveCriticalSection(&This->base.crit);
90 return CallNextHookEx(0, code, wparam, lparam);
93 static const GUID DInput_Wine_Keyboard_GUID = { /* 0ab8648a-7735-11d2-8c73-71df54a96441 */
94 0x0ab8648a,
95 0x7735,
96 0x11d2,
97 {0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41}
100 static void fill_keyboard_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version) {
101 DWORD dwSize;
102 DIDEVICEINSTANCEA ddi;
104 dwSize = lpddi->dwSize;
106 TRACE("%d %p\n", dwSize, lpddi);
108 memset(lpddi, 0, dwSize);
109 memset(&ddi, 0, sizeof(ddi));
111 ddi.dwSize = dwSize;
112 ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */
113 ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */
114 if (version >= 0x0800)
115 ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8);
116 else
117 ddi.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8);
118 strcpy(ddi.tszInstanceName, "Keyboard");
119 strcpy(ddi.tszProductName, "Wine Keyboard");
121 memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi)));
124 static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version) {
125 DWORD dwSize;
126 DIDEVICEINSTANCEW ddi;
128 dwSize = lpddi->dwSize;
130 TRACE("%d %p\n", dwSize, lpddi);
132 memset(lpddi, 0, dwSize);
133 memset(&ddi, 0, sizeof(ddi));
135 ddi.dwSize = dwSize;
136 ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */
137 ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */
138 if (version >= 0x0800)
139 ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8);
140 else
141 ddi.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8);
142 MultiByteToWideChar(CP_ACP, 0, "Keyboard", -1, ddi.tszInstanceName, MAX_PATH);
143 MultiByteToWideChar(CP_ACP, 0, "Wine Keyboard", -1, ddi.tszProductName, MAX_PATH);
145 memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi)));
148 static BOOL keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id)
150 if (id != 0)
151 return FALSE;
153 if ((dwDevType == 0) ||
154 ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) ||
155 (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 0x0800))) {
156 TRACE("Enumerating the Keyboard device\n");
158 fill_keyboard_dideviceinstanceA(lpddi, version);
160 return TRUE;
163 return FALSE;
166 static BOOL keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id)
168 if (id != 0)
169 return FALSE;
171 if ((dwDevType == 0) ||
172 ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) ||
173 (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 0x0800))) {
174 TRACE("Enumerating the Keyboard device\n");
176 fill_keyboard_dideviceinstanceW(lpddi, version);
178 return TRUE;
181 return FALSE;
184 static SysKeyboardImpl *alloc_device(REFGUID rguid, const void *kvt, IDirectInputImpl *dinput)
186 SysKeyboardImpl* newDevice;
187 LPDIDATAFORMAT df = NULL;
188 int i, idx = 0;
190 newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardImpl));
191 newDevice->base.lpVtbl = kvt;
192 newDevice->base.ref = 1;
193 memcpy(&newDevice->base.guid, rguid, sizeof(*rguid));
194 newDevice->base.dinput = dinput;
195 InitializeCriticalSection(&newDevice->base.crit);
196 newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysKeyboardImpl*->base.crit");
198 /* Create copy of default data format */
199 if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIKeyboard.dwSize))) goto failed;
200 memcpy(df, &c_dfDIKeyboard, c_dfDIKeyboard.dwSize);
201 if (!(df->rgodf = HeapAlloc(GetProcessHeap(), 0, df->dwNumObjs * df->dwObjSize))) goto failed;
203 for (i = 0; i < df->dwNumObjs; i++)
205 char buf[MAX_PATH];
207 if (!GetKeyNameTextA(((i & 0x7f) << 16) | ((i & 0x80) << 17), buf, sizeof(buf)))
208 continue;
210 memcpy(&df->rgodf[idx], &c_dfDIKeyboard.rgodf[i], df->dwObjSize);
211 df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_PSHBUTTON;
213 df->dwNumObjs = idx;
215 newDevice->base.data_format.wine_df = df;
216 IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->base.dinput);
217 return newDevice;
219 failed:
220 if (df) HeapFree(GetProcessHeap(), 0, df->rgodf);
221 HeapFree(GetProcessHeap(), 0, df);
222 HeapFree(GetProcessHeap(), 0, newDevice);
223 return NULL;
227 static HRESULT keyboarddev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev)
229 if ((IsEqualGUID(&GUID_SysKeyboard,rguid)) || /* Generic Keyboard */
230 (IsEqualGUID(&DInput_Wine_Keyboard_GUID,rguid))) { /* Wine Keyboard */
231 if ((riid == NULL) ||
232 IsEqualGUID(&IID_IDirectInputDeviceA,riid) ||
233 IsEqualGUID(&IID_IDirectInputDevice2A,riid) ||
234 IsEqualGUID(&IID_IDirectInputDevice7A,riid) ||
235 IsEqualGUID(&IID_IDirectInputDevice8A,riid)) {
236 *pdev = (IDirectInputDeviceA*) alloc_device(rguid, &SysKeyboardAvt, dinput);
237 TRACE("Creating a Keyboard device (%p)\n", *pdev);
238 if (!*pdev) return DIERR_OUTOFMEMORY;
239 return DI_OK;
240 } else
241 return DIERR_NOINTERFACE;
243 return DIERR_DEVICENOTREG;
246 static HRESULT keyboarddev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev)
248 if ((IsEqualGUID(&GUID_SysKeyboard,rguid)) || /* Generic Keyboard */
249 (IsEqualGUID(&DInput_Wine_Keyboard_GUID,rguid))) { /* Wine Keyboard */
250 if ((riid == NULL) ||
251 IsEqualGUID(&IID_IDirectInputDeviceW,riid) ||
252 IsEqualGUID(&IID_IDirectInputDevice2W,riid) ||
253 IsEqualGUID(&IID_IDirectInputDevice7W,riid) ||
254 IsEqualGUID(&IID_IDirectInputDevice8W,riid)) {
255 *pdev = (IDirectInputDeviceW*) alloc_device(rguid, &SysKeyboardWvt, dinput);
256 TRACE("Creating a Keyboard device (%p)\n", *pdev);
257 if (!*pdev) return DIERR_OUTOFMEMORY;
258 return DI_OK;
259 } else
260 return DIERR_NOINTERFACE;
262 return DIERR_DEVICENOTREG;
265 const struct dinput_device keyboard_device = {
266 "Wine keyboard driver",
267 keyboarddev_enum_deviceA,
268 keyboarddev_enum_deviceW,
269 keyboarddev_create_deviceA,
270 keyboarddev_create_deviceW
273 static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
274 LPDIRECTINPUTDEVICE8A iface,DWORD len,LPVOID ptr
277 SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
278 TRACE("(%p)->(%d,%p)\n", This, len, ptr);
280 if (!This->base.acquired) return DIERR_NOTACQUIRED;
282 if (len != WINE_DINPUT_KEYBOARD_MAX_KEYS)
283 return DIERR_INVALIDPARAM;
285 EnterCriticalSection(&This->base.crit);
287 if (TRACE_ON(dinput)) {
288 int i;
289 for (i = 0; i < WINE_DINPUT_KEYBOARD_MAX_KEYS; i++) {
290 if (This->DInputKeyState[i] != 0x00)
291 TRACE(" - %02X: %02x\n", i, This->DInputKeyState[i]);
295 memcpy(ptr, This->DInputKeyState, WINE_DINPUT_KEYBOARD_MAX_KEYS);
296 LeaveCriticalSection(&This->base.crit);
298 return DI_OK;
301 static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface);
303 static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
305 SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
306 HRESULT res;
308 TRACE("(%p)\n",This);
310 if ((res = IDirectInputDevice2AImpl_Acquire(iface)) != DI_OK) return res;
312 if (current_lock != NULL) {
313 FIXME("Not more than one keyboard can be acquired at the same time.\n");
314 SysKeyboardAImpl_Unacquire((LPDIRECTINPUTDEVICE8A)current_lock);
316 current_lock = This;
318 set_dinput_hook(WH_KEYBOARD_LL, KeyboardCallback);
320 return DI_OK;
323 static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
325 SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
326 HRESULT res;
328 TRACE("(this=%p)\n",This);
330 if ((res = IDirectInputDevice2AImpl_Unacquire(iface)) != DI_OK) return res;
332 set_dinput_hook(WH_KEYBOARD_LL, NULL);
334 /* No more locks */
335 if (current_lock == This)
336 current_lock = NULL;
337 else
338 ERR("this != current_lock\n");
340 return DI_OK;
343 /******************************************************************************
344 * GetCapabilities : get the device capablitites
346 static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
347 LPDIRECTINPUTDEVICE8A iface,
348 LPDIDEVCAPS lpDIDevCaps)
350 SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
351 DIDEVCAPS devcaps;
353 TRACE("(this=%p,%p)\n",This,lpDIDevCaps);
355 if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) {
356 WARN("invalid parameter\n");
357 return DIERR_INVALIDPARAM;
360 devcaps.dwSize = lpDIDevCaps->dwSize;
361 devcaps.dwFlags = DIDC_ATTACHED;
362 if (This->base.dinput->dwVersion >= 0x0800)
363 devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8);
364 else
365 devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8);
366 devcaps.dwAxes = 0;
367 devcaps.dwButtons = This->base.data_format.wine_df->dwNumObjs;
368 devcaps.dwPOVs = 0;
369 devcaps.dwFFSamplePeriod = 0;
370 devcaps.dwFFMinTimeResolution = 0;
371 devcaps.dwFirmwareRevision = 100;
372 devcaps.dwHardwareRevision = 100;
373 devcaps.dwFFDriverVersion = 0;
375 memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize);
377 return DI_OK;
380 /******************************************************************************
381 * GetObjectInfo : get information about a device object such as a button
382 * or axis
384 static HRESULT WINAPI
385 SysKeyboardAImpl_GetObjectInfo(
386 LPDIRECTINPUTDEVICE8A iface,
387 LPDIDEVICEOBJECTINSTANCEA pdidoi,
388 DWORD dwObj,
389 DWORD dwHow)
391 HRESULT res;
393 res = IDirectInputDevice2AImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow);
394 if (res != DI_OK) return res;
396 if (!GetKeyNameTextA((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 |
397 (DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16,
398 pdidoi->tszName, sizeof(pdidoi->tszName)))
399 return DIERR_OBJECTNOTFOUND;
401 _dump_OBJECTINSTANCEA(pdidoi);
402 return res;
405 static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
406 LPDIDEVICEOBJECTINSTANCEW pdidoi,
407 DWORD dwObj,
408 DWORD dwHow)
410 HRESULT res;
412 res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow);
413 if (res != DI_OK) return res;
415 if (!GetKeyNameTextW((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 |
416 (DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16,
417 pdidoi->tszName, sizeof(pdidoi->tszName)))
418 return DIERR_OBJECTNOTFOUND;
420 _dump_OBJECTINSTANCEW(pdidoi);
421 return res;
424 /******************************************************************************
425 * GetDeviceInfo : get information about a device's identity
427 static HRESULT WINAPI SysKeyboardAImpl_GetDeviceInfo(
428 LPDIRECTINPUTDEVICE8A iface,
429 LPDIDEVICEINSTANCEA pdidi)
431 SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
432 TRACE("(this=%p,%p)\n", This, pdidi);
434 if (pdidi->dwSize != sizeof(DIDEVICEINSTANCEA)) {
435 WARN(" dinput3 not supported yet...\n");
436 return DI_OK;
439 fill_keyboard_dideviceinstanceA(pdidi, This->base.dinput->dwVersion);
441 return DI_OK;
444 static HRESULT WINAPI SysKeyboardWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEINSTANCEW pdidi)
446 SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
447 TRACE("(this=%p,%p)\n", This, pdidi);
449 if (pdidi->dwSize != sizeof(DIDEVICEINSTANCEW)) {
450 WARN(" dinput3 not supported yet...\n");
451 return DI_OK;
454 fill_keyboard_dideviceinstanceW(pdidi, This->base.dinput->dwVersion);
456 return DI_OK;
459 static const IDirectInputDevice8AVtbl SysKeyboardAvt =
461 IDirectInputDevice2AImpl_QueryInterface,
462 IDirectInputDevice2AImpl_AddRef,
463 IDirectInputDevice2AImpl_Release,
464 SysKeyboardAImpl_GetCapabilities,
465 IDirectInputDevice2AImpl_EnumObjects,
466 IDirectInputDevice2AImpl_GetProperty,
467 IDirectInputDevice2AImpl_SetProperty,
468 SysKeyboardAImpl_Acquire,
469 SysKeyboardAImpl_Unacquire,
470 SysKeyboardAImpl_GetDeviceState,
471 IDirectInputDevice2AImpl_GetDeviceData,
472 IDirectInputDevice2AImpl_SetDataFormat,
473 IDirectInputDevice2AImpl_SetEventNotification,
474 IDirectInputDevice2AImpl_SetCooperativeLevel,
475 SysKeyboardAImpl_GetObjectInfo,
476 SysKeyboardAImpl_GetDeviceInfo,
477 IDirectInputDevice2AImpl_RunControlPanel,
478 IDirectInputDevice2AImpl_Initialize,
479 IDirectInputDevice2AImpl_CreateEffect,
480 IDirectInputDevice2AImpl_EnumEffects,
481 IDirectInputDevice2AImpl_GetEffectInfo,
482 IDirectInputDevice2AImpl_GetForceFeedbackState,
483 IDirectInputDevice2AImpl_SendForceFeedbackCommand,
484 IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
485 IDirectInputDevice2AImpl_Escape,
486 IDirectInputDevice2AImpl_Poll,
487 IDirectInputDevice2AImpl_SendDeviceData,
488 IDirectInputDevice7AImpl_EnumEffectsInFile,
489 IDirectInputDevice7AImpl_WriteEffectToFile,
490 IDirectInputDevice8AImpl_BuildActionMap,
491 IDirectInputDevice8AImpl_SetActionMap,
492 IDirectInputDevice8AImpl_GetImageInfo
495 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
496 # define XCAST(fun) (typeof(SysKeyboardWvt.fun))
497 #else
498 # define XCAST(fun) (void*)
499 #endif
501 static const IDirectInputDevice8WVtbl SysKeyboardWvt =
503 IDirectInputDevice2WImpl_QueryInterface,
504 XCAST(AddRef)IDirectInputDevice2AImpl_AddRef,
505 XCAST(Release)IDirectInputDevice2AImpl_Release,
506 XCAST(GetCapabilities)SysKeyboardAImpl_GetCapabilities,
507 IDirectInputDevice2WImpl_EnumObjects,
508 XCAST(GetProperty)IDirectInputDevice2AImpl_GetProperty,
509 XCAST(SetProperty)IDirectInputDevice2AImpl_SetProperty,
510 XCAST(Acquire)SysKeyboardAImpl_Acquire,
511 XCAST(Unacquire)SysKeyboardAImpl_Unacquire,
512 XCAST(GetDeviceState)SysKeyboardAImpl_GetDeviceState,
513 XCAST(GetDeviceData)IDirectInputDevice2AImpl_GetDeviceData,
514 XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat,
515 XCAST(SetEventNotification)IDirectInputDevice2AImpl_SetEventNotification,
516 XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel,
517 SysKeyboardWImpl_GetObjectInfo,
518 SysKeyboardWImpl_GetDeviceInfo,
519 XCAST(RunControlPanel)IDirectInputDevice2AImpl_RunControlPanel,
520 XCAST(Initialize)IDirectInputDevice2AImpl_Initialize,
521 XCAST(CreateEffect)IDirectInputDevice2AImpl_CreateEffect,
522 IDirectInputDevice2WImpl_EnumEffects,
523 IDirectInputDevice2WImpl_GetEffectInfo,
524 XCAST(GetForceFeedbackState)IDirectInputDevice2AImpl_GetForceFeedbackState,
525 XCAST(SendForceFeedbackCommand)IDirectInputDevice2AImpl_SendForceFeedbackCommand,
526 XCAST(EnumCreatedEffectObjects)IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
527 XCAST(Escape)IDirectInputDevice2AImpl_Escape,
528 XCAST(Poll)IDirectInputDevice2AImpl_Poll,
529 XCAST(SendDeviceData)IDirectInputDevice2AImpl_SendDeviceData,
530 IDirectInputDevice7WImpl_EnumEffectsInFile,
531 IDirectInputDevice7WImpl_WriteEffectToFile,
532 IDirectInputDevice8WImpl_BuildActionMap,
533 IDirectInputDevice8WImpl_SetActionMap,
534 IDirectInputDevice8WImpl_GetImageInfo
536 #undef XCAST