3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998,1999 Lionel Ulmer
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 /* This file contains all the Device specific functions that can be used as stubs
23 by real device implementations.
25 It also contains all the helper functions.
31 #include "wine/debug.h"
32 #include "wine/unicode.h"
39 #include "device_private.h"
40 #include "dinput_private.h"
42 WINE_DEFAULT_DEBUG_CHANNEL(dinput
);
44 /******************************************************************************
45 * Various debugging tools
47 static void _dump_cooperativelevel_DI(DWORD dwFlags
) {
48 if (TRACE_ON(dinput
)) {
54 #define FE(x) { x, #x}
58 FE(DISCL_NONEXCLUSIVE
),
62 TRACE(" cooperative level : ");
63 for (i
= 0; i
< (sizeof(flags
) / sizeof(flags
[0])); i
++)
64 if (flags
[i
].mask
& dwFlags
)
65 TRACE("%s ",flags
[i
].name
);
70 static void _dump_EnumObjects_flags(DWORD dwFlags
) {
71 if (TRACE_ON(dinput
)) {
78 #define FE(x) { x, #x}
87 FE(DIDFT_FFEFFECTTRIGGER
),
89 FE(DIDFT_VENDORDEFINED
),
94 type
= (dwFlags
& 0xFF0000FF);
95 instance
= ((dwFlags
>> 8) & 0xFFFF);
97 if (type
== DIDFT_ALL
) {
100 for (i
= 0; i
< (sizeof(flags
) / sizeof(flags
[0])); i
++) {
101 if (flags
[i
].mask
& type
) {
102 type
&= ~flags
[i
].mask
;
103 TRACE(" %s",flags
[i
].name
);
107 TRACE(" (unhandled: %08x)", type
);
110 TRACE(" / Instance: ");
111 if (instance
== ((DIDFT_ANYINSTANCE
>> 8) & 0xFFFF)) {
112 TRACE("DIDFT_ANYINSTANCE");
114 TRACE("%3d", instance
);
119 void _dump_DIPROPHEADER(LPCDIPROPHEADER diph
) {
120 if (TRACE_ON(dinput
)) {
121 TRACE(" - dwObj = 0x%08x\n", diph
->dwObj
);
122 TRACE(" - dwHow = %s\n",
123 ((diph
->dwHow
== DIPH_DEVICE
) ? "DIPH_DEVICE" :
124 ((diph
->dwHow
== DIPH_BYOFFSET
) ? "DIPH_BYOFFSET" :
125 ((diph
->dwHow
== DIPH_BYID
)) ? "DIPH_BYID" : "unknown")));
129 void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA
*ddoi
) {
130 TRACE(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n",
131 debugstr_guid(&ddoi
->guidType
), _dump_dinput_GUID(&ddoi
->guidType
), ddoi
->dwOfs
, ddoi
->dwType
, ddoi
->tszName
);
134 void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW
*ddoi
) {
135 TRACE(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s\n",
136 debugstr_guid(&ddoi
->guidType
), _dump_dinput_GUID(&ddoi
->guidType
), ddoi
->dwOfs
, ddoi
->dwType
, debugstr_w(ddoi
->tszName
));
139 /* This function is a helper to convert a GUID into any possible DInput GUID out there */
140 const char *_dump_dinput_GUID(const GUID
*guid
) {
142 static const struct {
146 #define FE(x) { &x, #x}
159 FE(GUID_SysKeyboard
),
161 FE(GUID_ConstantForce
),
167 FE(GUID_SawtoothDown
),
177 for (i
= 0; i
< (sizeof(guids
) / sizeof(guids
[0])); i
++) {
178 if (IsEqualGUID(guids
[i
].guid
, guid
)) {
179 return guids
[i
].name
;
182 return debugstr_guid(guid
);
185 void _dump_DIDATAFORMAT(const DIDATAFORMAT
*df
) {
188 TRACE("Dumping DIDATAFORMAT structure:\n");
189 TRACE(" - dwSize: %d\n", df
->dwSize
);
190 if (df
->dwSize
!= sizeof(DIDATAFORMAT
)) {
191 WARN("Non-standard DIDATAFORMAT structure size %d\n", df
->dwSize
);
193 TRACE(" - dwObjsize: %d\n", df
->dwObjSize
);
194 if (df
->dwObjSize
!= sizeof(DIOBJECTDATAFORMAT
)) {
195 WARN("Non-standard DIOBJECTDATAFORMAT structure size %d\n", df
->dwObjSize
);
197 TRACE(" - dwFlags: 0x%08x (", df
->dwFlags
);
198 switch (df
->dwFlags
) {
199 case DIDF_ABSAXIS
: TRACE("DIDF_ABSAXIS"); break;
200 case DIDF_RELAXIS
: TRACE("DIDF_RELAXIS"); break;
201 default: TRACE("unknown"); break;
204 TRACE(" - dwDataSize: %d\n", df
->dwDataSize
);
205 TRACE(" - dwNumObjs: %d\n", df
->dwNumObjs
);
207 for (i
= 0; i
< df
->dwNumObjs
; i
++) {
208 TRACE(" - Object %d:\n", i
);
209 TRACE(" * GUID: %s ('%s')\n", debugstr_guid(df
->rgodf
[i
].pguid
), _dump_dinput_GUID(df
->rgodf
[i
].pguid
));
210 TRACE(" * dwOfs: %d\n", df
->rgodf
[i
].dwOfs
);
211 TRACE(" * dwType: 0x%08x\n", df
->rgodf
[i
].dwType
);
212 TRACE(" "); _dump_EnumObjects_flags(df
->rgodf
[i
].dwType
); TRACE("\n");
213 TRACE(" * dwFlags: 0x%08x\n", df
->rgodf
[i
].dwFlags
);
217 /******************************************************************************
218 * Get the default and the app-specific config keys.
220 BOOL
get_app_key(HKEY
*defkey
, HKEY
*appkey
)
222 char buffer
[MAX_PATH
+16];
227 /* @@ Wine registry key: HKCU\Software\Wine\DirectInput */
228 if (RegOpenKeyA(HKEY_CURRENT_USER
, "Software\\Wine\\DirectInput", defkey
))
231 len
= GetModuleFileNameA(0, buffer
, MAX_PATH
);
232 if (len
&& len
< MAX_PATH
)
236 /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\DirectInput */
237 if (!RegOpenKeyA(HKEY_CURRENT_USER
, "Software\\Wine\\AppDefaults", &tmpkey
))
239 char *p
, *appname
= buffer
;
240 if ((p
= strrchr(appname
, '/'))) appname
= p
+ 1;
241 if ((p
= strrchr(appname
, '\\'))) appname
= p
+ 1;
242 strcat(appname
, "\\DirectInput");
244 if (RegOpenKeyA(tmpkey
, appname
, appkey
)) *appkey
= 0;
249 return *defkey
|| *appkey
;
252 /******************************************************************************
253 * Get a config key from either the app-specific or the default config
255 DWORD
get_config_key( HKEY defkey
, HKEY appkey
, const char *name
,
256 char *buffer
, DWORD size
)
258 if (appkey
&& !RegQueryValueExA( appkey
, name
, 0, NULL
, (LPBYTE
)buffer
, &size
))
261 if (defkey
&& !RegQueryValueExA( defkey
, name
, 0, NULL
, (LPBYTE
)buffer
, &size
))
264 return ERROR_FILE_NOT_FOUND
;
267 /* Conversion between internal data buffer and external data buffer */
268 void fill_DataFormat(void *out
, DWORD size
, const void *in
, const DataFormat
*df
)
271 const char *in_c
= in
;
272 char *out_c
= (char *) out
;
274 memset(out
, 0, size
);
275 if (df
->dt
== NULL
) {
276 /* This means that the app uses Wine's internal data format */
277 memcpy(out
, in
, df
->internal_format_size
);
279 for (i
= 0; i
< df
->size
; i
++) {
280 if (df
->dt
[i
].offset_in
>= 0) {
281 switch (df
->dt
[i
].size
) {
283 TRACE("Copying (c) to %d from %d (value %d)\n",
284 df
->dt
[i
].offset_out
, df
->dt
[i
].offset_in
, *(in_c
+ df
->dt
[i
].offset_in
));
285 *(out_c
+ df
->dt
[i
].offset_out
) = *(in_c
+ df
->dt
[i
].offset_in
);
289 TRACE("Copying (s) to %d from %d (value %d)\n",
290 df
->dt
[i
].offset_out
, df
->dt
[i
].offset_in
, *((const short *)(in_c
+ df
->dt
[i
].offset_in
)));
291 *((short *)(out_c
+ df
->dt
[i
].offset_out
)) = *((const short *)(in_c
+ df
->dt
[i
].offset_in
));
295 TRACE("Copying (i) to %d from %d (value %d)\n",
296 df
->dt
[i
].offset_out
, df
->dt
[i
].offset_in
, *((const int *)(in_c
+ df
->dt
[i
].offset_in
)));
297 *((int *)(out_c
+ df
->dt
[i
].offset_out
)) = *((const int *)(in_c
+ df
->dt
[i
].offset_in
));
301 memcpy((out_c
+ df
->dt
[i
].offset_out
), (in_c
+ df
->dt
[i
].offset_in
), df
->dt
[i
].size
);
305 switch (df
->dt
[i
].size
) {
307 TRACE("Copying (c) to %d default value %d\n",
308 df
->dt
[i
].offset_out
, df
->dt
[i
].value
);
309 *(out_c
+ df
->dt
[i
].offset_out
) = (char) df
->dt
[i
].value
;
313 TRACE("Copying (s) to %d default value %d\n",
314 df
->dt
[i
].offset_out
, df
->dt
[i
].value
);
315 *((short *) (out_c
+ df
->dt
[i
].offset_out
)) = (short) df
->dt
[i
].value
;
319 TRACE("Copying (i) to %d default value %d\n",
320 df
->dt
[i
].offset_out
, df
->dt
[i
].value
);
321 *((int *) (out_c
+ df
->dt
[i
].offset_out
)) = df
->dt
[i
].value
;
325 memset((out_c
+ df
->dt
[i
].offset_out
), 0, df
->dt
[i
].size
);
333 void release_DataFormat(DataFormat
* format
)
335 TRACE("Deleting DataFormat: %p\n", format
);
337 HeapFree(GetProcessHeap(), 0, format
->dt
);
339 HeapFree(GetProcessHeap(), 0, format
->offsets
);
340 format
->offsets
= NULL
;
341 HeapFree(GetProcessHeap(), 0, format
->user_df
);
342 format
->user_df
= NULL
;
345 static inline LPDIOBJECTDATAFORMAT
dataformat_to_odf(LPCDIDATAFORMAT df
, int idx
)
347 if (idx
< 0 || idx
>= df
->dwNumObjs
) return NULL
;
348 return (LPDIOBJECTDATAFORMAT
)((LPBYTE
)df
->rgodf
+ idx
* df
->dwObjSize
);
351 static HRESULT
create_DataFormat(LPCDIDATAFORMAT asked_format
, DataFormat
*format
)
360 if (!format
->wine_df
) return DIERR_INVALIDPARAM
;
361 done
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, asked_format
->dwNumObjs
* sizeof(int));
362 dt
= HeapAlloc(GetProcessHeap(), 0, asked_format
->dwNumObjs
* sizeof(DataTransform
));
363 if (!dt
|| !done
) goto failed
;
365 if (!(format
->offsets
= HeapAlloc(GetProcessHeap(), 0, format
->wine_df
->dwNumObjs
* sizeof(int))))
368 if (!(format
->user_df
= HeapAlloc(GetProcessHeap(), 0, asked_format
->dwSize
)))
370 memcpy(format
->user_df
, asked_format
, asked_format
->dwSize
);
372 TRACE("Creating DataTransform :\n");
374 for (i
= 0; i
< format
->wine_df
->dwNumObjs
; i
++)
376 format
->offsets
[i
] = -1;
378 for (j
= 0; j
< asked_format
->dwNumObjs
; j
++) {
382 if (/* Check if the application either requests any GUID and if not, it if matches
383 * the GUID of the Wine object.
385 ((asked_format
->rgodf
[j
].pguid
== NULL
) ||
386 (format
->wine_df
->rgodf
[i
].pguid
== NULL
) ||
387 (IsEqualGUID(format
->wine_df
->rgodf
[i
].pguid
, asked_format
->rgodf
[j
].pguid
)))
389 (/* Then check if it accepts any instance id, and if not, if it matches Wine's
392 ((asked_format
->rgodf
[j
].dwType
& DIDFT_INSTANCEMASK
) == DIDFT_ANYINSTANCE
) ||
393 (DIDFT_GETINSTANCE(asked_format
->rgodf
[j
].dwType
) == 0x00FF) || /* This is mentionned in no DX docs, but it works fine - tested on WinXP */
394 (DIDFT_GETINSTANCE(asked_format
->rgodf
[j
].dwType
) == DIDFT_GETINSTANCE(format
->wine_df
->rgodf
[i
].dwType
)))
396 ( /* Then if the asked type matches the one Wine provides */
397 DIDFT_GETTYPE(asked_format
->rgodf
[j
].dwType
) & format
->wine_df
->rgodf
[i
].dwType
))
401 TRACE("Matching :\n");
402 TRACE(" - Asked (%d) :\n", j
);
403 TRACE(" * GUID: %s ('%s')\n",
404 debugstr_guid(asked_format
->rgodf
[j
].pguid
),
405 _dump_dinput_GUID(asked_format
->rgodf
[j
].pguid
));
406 TRACE(" * Offset: %3d\n", asked_format
->rgodf
[j
].dwOfs
);
407 TRACE(" * dwType: %08x\n", asked_format
->rgodf
[j
].dwType
);
408 TRACE(" "); _dump_EnumObjects_flags(asked_format
->rgodf
[j
].dwType
); TRACE("\n");
410 TRACE(" - Wine (%d) :\n", i
);
411 TRACE(" * GUID: %s ('%s')\n",
412 debugstr_guid(format
->wine_df
->rgodf
[i
].pguid
),
413 _dump_dinput_GUID(format
->wine_df
->rgodf
[i
].pguid
));
414 TRACE(" * Offset: %3d\n", format
->wine_df
->rgodf
[i
].dwOfs
);
415 TRACE(" * dwType: %08x\n", format
->wine_df
->rgodf
[i
].dwType
);
416 TRACE(" "); _dump_EnumObjects_flags(format
->wine_df
->rgodf
[i
].dwType
); TRACE("\n");
418 if (format
->wine_df
->rgodf
[i
].dwType
& DIDFT_BUTTON
)
419 dt
[index
].size
= sizeof(BYTE
);
421 dt
[index
].size
= sizeof(DWORD
);
422 dt
[index
].offset_in
= format
->wine_df
->rgodf
[i
].dwOfs
;
423 dt
[index
].offset_out
= asked_format
->rgodf
[j
].dwOfs
;
424 format
->offsets
[i
] = asked_format
->rgodf
[j
].dwOfs
;
426 next
= next
+ dt
[index
].size
;
428 if (format
->wine_df
->rgodf
[i
].dwOfs
!= dt
[index
].offset_out
)
436 if (j
== asked_format
->dwNumObjs
)
440 TRACE("Setting to default value :\n");
441 for (j
= 0; j
< asked_format
->dwNumObjs
; j
++) {
443 TRACE(" - Asked (%d) :\n", j
);
444 TRACE(" * GUID: %s ('%s')\n",
445 debugstr_guid(asked_format
->rgodf
[j
].pguid
),
446 _dump_dinput_GUID(asked_format
->rgodf
[j
].pguid
));
447 TRACE(" * Offset: %3d\n", asked_format
->rgodf
[j
].dwOfs
);
448 TRACE(" * dwType: %08x\n", asked_format
->rgodf
[j
].dwType
);
449 TRACE(" "); _dump_EnumObjects_flags(asked_format
->rgodf
[j
].dwType
); TRACE("\n");
451 if (asked_format
->rgodf
[j
].dwType
& DIDFT_BUTTON
)
452 dt
[index
].size
= sizeof(BYTE
);
454 dt
[index
].size
= sizeof(DWORD
);
455 dt
[index
].offset_in
= -1;
456 dt
[index
].offset_out
= asked_format
->rgodf
[j
].dwOfs
;
457 if (asked_format
->rgodf
[j
].dwType
& DIDFT_POV
)
458 dt
[index
].value
= -1;
467 format
->internal_format_size
= format
->wine_df
->dwDataSize
;
468 format
->size
= index
;
470 HeapFree(GetProcessHeap(), 0, dt
);
475 HeapFree(GetProcessHeap(), 0, done
);
480 HeapFree(GetProcessHeap(), 0, done
);
481 HeapFree(GetProcessHeap(), 0, dt
);
483 HeapFree(GetProcessHeap(), 0, format
->offsets
);
484 format
->offsets
= NULL
;
485 HeapFree(GetProcessHeap(), 0, format
->user_df
);
486 format
->user_df
= NULL
;
488 return DIERR_OUTOFMEMORY
;
491 /* find an object by it's offset in a data format */
492 static int offset_to_object(const DataFormat
*df
, int offset
)
496 if (!df
->offsets
) return -1;
498 for (i
= 0; i
< df
->wine_df
->dwNumObjs
; i
++)
499 if (df
->offsets
[i
] == offset
) return i
;
504 int id_to_object(LPCDIDATAFORMAT df
, int id
)
509 for (i
= 0; i
< df
->dwNumObjs
; i
++)
510 if ((dataformat_to_odf(df
, i
)->dwType
& 0x00ffffff) == id
)
516 int id_to_offset(const DataFormat
*df
, int id
)
518 int obj
= id_to_object(df
->wine_df
, id
);
520 return obj
>= 0 && df
->offsets
? df
->offsets
[obj
] : -1;
523 int find_property(const DataFormat
*df
, LPCDIPROPHEADER ph
)
527 case DIPH_BYID
: return id_to_object(df
->wine_df
, ph
->dwObj
);
528 case DIPH_BYOFFSET
: return offset_to_object(df
, ph
->dwObj
);
530 FIXME("Unhandled ph->dwHow=='%04X'\n", (unsigned int)ph
->dwHow
);
535 /******************************************************************************
536 * queue_event - add new event to the ring queue
539 void queue_event(LPDIRECTINPUTDEVICE8A iface
, int ofs
, DWORD data
, DWORD time
, DWORD seq
)
541 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
544 /* Event is being set regardless of the queue state */
545 if (This
->hEvent
) SetEvent(This
->hEvent
);
547 if (!This
->queue_len
|| This
->overflow
|| ofs
< 0) return;
549 next_pos
= (This
->queue_head
+ 1) % This
->queue_len
;
550 if (next_pos
== This
->queue_tail
)
552 TRACE(" queue overflowed\n");
553 This
->overflow
= TRUE
;
557 TRACE(" queueing %d at offset %d (queue head %d / size %d)\n",
558 data
, ofs
, This
->queue_head
, This
->queue_len
);
560 This
->data_queue
[This
->queue_head
].dwOfs
= ofs
;
561 This
->data_queue
[This
->queue_head
].dwData
= data
;
562 This
->data_queue
[This
->queue_head
].dwTimeStamp
= time
;
563 This
->data_queue
[This
->queue_head
].dwSequence
= seq
;
564 This
->queue_head
= next_pos
;
565 /* Send event if asked */
568 /******************************************************************************
572 HRESULT WINAPI
IDirectInputDevice2AImpl_Acquire(LPDIRECTINPUTDEVICE8A iface
)
574 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
577 if (!This
->data_format
.user_df
) return DIERR_INVALIDPARAM
;
578 if (This
->dwCoopLevel
& DISCL_FOREGROUND
&& This
->win
!= GetForegroundWindow())
579 return DIERR_OTHERAPPHASPRIO
;
581 EnterCriticalSection(&This
->crit
);
582 res
= This
->acquired
? S_FALSE
: DI_OK
;
586 This
->queue_head
= This
->queue_tail
= This
->overflow
= 0;
587 check_dinput_hooks(iface
);
589 LeaveCriticalSection(&This
->crit
);
594 /******************************************************************************
598 HRESULT WINAPI
IDirectInputDevice2AImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface
)
600 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
603 EnterCriticalSection(&This
->crit
);
604 res
= !This
->acquired
? DI_NOEFFECT
: DI_OK
;
607 check_dinput_hooks(iface
);
608 LeaveCriticalSection(&This
->crit
);
613 /******************************************************************************
614 * IDirectInputDeviceA
617 HRESULT WINAPI
IDirectInputDevice2AImpl_SetDataFormat(
618 LPDIRECTINPUTDEVICE8A iface
, LPCDIDATAFORMAT df
)
620 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
623 if (!df
) return E_POINTER
;
624 TRACE("(%p) %p\n", This
, df
);
625 _dump_DIDATAFORMAT(df
);
627 if (df
->dwSize
!= sizeof(DIDATAFORMAT
)) return DIERR_INVALIDPARAM
;
628 if (This
->acquired
) return DIERR_ACQUIRED
;
630 EnterCriticalSection(&This
->crit
);
632 release_DataFormat(&This
->data_format
);
633 res
= create_DataFormat(df
, &This
->data_format
);
635 LeaveCriticalSection(&This
->crit
);
639 /******************************************************************************
640 * SetCooperativeLevel
642 * Set cooperative level and the source window for the events.
644 HRESULT WINAPI
IDirectInputDevice2AImpl_SetCooperativeLevel(
645 LPDIRECTINPUTDEVICE8A iface
, HWND hwnd
, DWORD dwflags
)
647 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
649 TRACE("(%p) %p,0x%08x\n", This
, hwnd
, dwflags
);
650 _dump_cooperativelevel_DI(dwflags
);
652 if ((dwflags
& (DISCL_EXCLUSIVE
| DISCL_NONEXCLUSIVE
)) == 0 ||
653 (dwflags
& (DISCL_EXCLUSIVE
| DISCL_NONEXCLUSIVE
)) == (DISCL_EXCLUSIVE
| DISCL_NONEXCLUSIVE
) ||
654 (dwflags
& (DISCL_FOREGROUND
| DISCL_BACKGROUND
)) == 0 ||
655 (dwflags
& (DISCL_FOREGROUND
| DISCL_BACKGROUND
)) == (DISCL_FOREGROUND
| DISCL_BACKGROUND
))
656 return DIERR_INVALIDPARAM
;
658 if (dwflags
== (DISCL_NONEXCLUSIVE
| DISCL_BACKGROUND
))
659 hwnd
= GetDesktopWindow();
661 if (!hwnd
) return E_HANDLE
;
663 /* For security reasons native does not allow exclusive background level
664 for mouse and keyboard only */
665 if (dwflags
& DISCL_EXCLUSIVE
&& dwflags
& DISCL_BACKGROUND
&&
666 (IsEqualGUID(&This
->guid
, &GUID_SysMouse
) ||
667 IsEqualGUID(&This
->guid
, &GUID_SysKeyboard
)))
668 return DIERR_UNSUPPORTED
;
670 /* Store the window which asks for the mouse */
671 EnterCriticalSection(&This
->crit
);
673 This
->dwCoopLevel
= dwflags
;
674 LeaveCriticalSection(&This
->crit
);
679 /******************************************************************************
680 * SetEventNotification : specifies event to be sent on state change
682 HRESULT WINAPI
IDirectInputDevice2AImpl_SetEventNotification(
683 LPDIRECTINPUTDEVICE8A iface
, HANDLE event
)
685 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
687 TRACE("(%p) %p\n", This
, event
);
689 EnterCriticalSection(&This
->crit
);
690 This
->hEvent
= event
;
691 LeaveCriticalSection(&This
->crit
);
695 ULONG WINAPI
IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface
)
697 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
700 ref
= InterlockedDecrement(&(This
->ref
));
703 IDirectInputDevice_Unacquire(iface
);
704 /* Reset the FF state, free all effects, etc */
705 IDirectInputDevice8_SendForceFeedbackCommand(iface
, DISFFC_RESET
);
707 HeapFree(GetProcessHeap(), 0, This
->data_queue
);
709 /* Free data format */
710 HeapFree(GetProcessHeap(), 0, This
->data_format
.wine_df
->rgodf
);
711 HeapFree(GetProcessHeap(), 0, This
->data_format
.wine_df
);
712 release_DataFormat(&This
->data_format
);
714 EnterCriticalSection( &This
->dinput
->crit
);
715 list_remove( &This
->entry
);
716 LeaveCriticalSection( &This
->dinput
->crit
);
718 IDirectInput_Release((LPDIRECTINPUTDEVICE8A
)This
->dinput
);
719 This
->crit
.DebugInfo
->Spare
[0] = 0;
720 DeleteCriticalSection(&This
->crit
);
722 HeapFree(GetProcessHeap(), 0, This
);
727 HRESULT WINAPI
IDirectInputDevice2AImpl_QueryInterface(
728 LPDIRECTINPUTDEVICE8A iface
,REFIID riid
,LPVOID
*ppobj
731 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
733 TRACE("(this=%p,%s,%p)\n",This
,debugstr_guid(riid
),ppobj
);
734 if (IsEqualGUID(&IID_IUnknown
,riid
)) {
735 IDirectInputDevice2_AddRef(iface
);
739 if (IsEqualGUID(&IID_IDirectInputDeviceA
,riid
)) {
740 IDirectInputDevice2_AddRef(iface
);
744 if (IsEqualGUID(&IID_IDirectInputDevice2A
,riid
)) {
745 IDirectInputDevice2_AddRef(iface
);
749 if (IsEqualGUID(&IID_IDirectInputDevice7A
,riid
)) {
750 IDirectInputDevice7_AddRef(iface
);
754 if (IsEqualGUID(&IID_IDirectInputDevice8A
,riid
)) {
755 IDirectInputDevice8_AddRef(iface
);
759 TRACE("Unsupported interface !\n");
763 HRESULT WINAPI
IDirectInputDevice2WImpl_QueryInterface(
764 LPDIRECTINPUTDEVICE8W iface
,REFIID riid
,LPVOID
*ppobj
767 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
769 TRACE("(this=%p,%s,%p)\n",This
,debugstr_guid(riid
),ppobj
);
770 if (IsEqualGUID(&IID_IUnknown
,riid
)) {
771 IDirectInputDevice2_AddRef(iface
);
775 if (IsEqualGUID(&IID_IDirectInputDeviceW
,riid
)) {
776 IDirectInputDevice2_AddRef(iface
);
780 if (IsEqualGUID(&IID_IDirectInputDevice2W
,riid
)) {
781 IDirectInputDevice2_AddRef(iface
);
785 if (IsEqualGUID(&IID_IDirectInputDevice7W
,riid
)) {
786 IDirectInputDevice7_AddRef(iface
);
790 if (IsEqualGUID(&IID_IDirectInputDevice8W
,riid
)) {
791 IDirectInputDevice8_AddRef(iface
);
795 TRACE("Unsupported interface !\n");
799 ULONG WINAPI
IDirectInputDevice2AImpl_AddRef(
800 LPDIRECTINPUTDEVICE8A iface
)
802 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
803 return InterlockedIncrement(&(This
->ref
));
806 HRESULT WINAPI
IDirectInputDevice2AImpl_EnumObjects(LPDIRECTINPUTDEVICE8A iface
,
807 LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback
, LPVOID lpvRef
, DWORD dwFlags
)
809 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
810 DIDEVICEOBJECTINSTANCEA ddoi
;
813 TRACE("(%p) %p,%p flags:%08x)\n", iface
, lpCallback
, lpvRef
, dwFlags
);
814 TRACE(" - flags = ");
815 _dump_EnumObjects_flags(dwFlags
);
818 /* Only the fields till dwFFMaxForce are relevant */
819 memset(&ddoi
, 0, sizeof(ddoi
));
820 ddoi
.dwSize
= FIELD_OFFSET(DIDEVICEOBJECTINSTANCEA
, dwFFMaxForce
);
822 for (i
= 0; i
< This
->data_format
.wine_df
->dwNumObjs
; i
++)
824 LPDIOBJECTDATAFORMAT odf
= dataformat_to_odf(This
->data_format
.wine_df
, i
);
826 if (dwFlags
!= DIDFT_ALL
&& !(dwFlags
& DIEFT_GETTYPE(odf
->dwType
))) continue;
827 if (IDirectInputDevice_GetObjectInfo(iface
, &ddoi
, odf
->dwType
, DIPH_BYID
) != DI_OK
)
830 if (lpCallback(&ddoi
, lpvRef
) != DIENUM_CONTINUE
) break;
836 HRESULT WINAPI
IDirectInputDevice2WImpl_EnumObjects(LPDIRECTINPUTDEVICE8W iface
,
837 LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback
, LPVOID lpvRef
, DWORD dwFlags
)
839 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
840 DIDEVICEOBJECTINSTANCEW ddoi
;
843 TRACE("(%p) %p,%p flags:%08x)\n", iface
, lpCallback
, lpvRef
, dwFlags
);
844 TRACE(" - flags = ");
845 _dump_EnumObjects_flags(dwFlags
);
848 /* Only the fields till dwFFMaxForce are relevant */
849 memset(&ddoi
, 0, sizeof(ddoi
));
850 ddoi
.dwSize
= FIELD_OFFSET(DIDEVICEOBJECTINSTANCEW
, dwFFMaxForce
);
852 for (i
= 0; i
< This
->data_format
.wine_df
->dwNumObjs
; i
++)
854 LPDIOBJECTDATAFORMAT odf
= dataformat_to_odf(This
->data_format
.wine_df
, i
);
856 if (dwFlags
!= DIDFT_ALL
&& !(dwFlags
& DIEFT_GETTYPE(odf
->dwType
))) continue;
857 if (IDirectInputDevice_GetObjectInfo(iface
, &ddoi
, odf
->dwType
, DIPH_BYID
) != DI_OK
)
860 if (lpCallback(&ddoi
, lpvRef
) != DIENUM_CONTINUE
) break;
866 /******************************************************************************
870 HRESULT WINAPI
IDirectInputDevice2AImpl_GetProperty(
871 LPDIRECTINPUTDEVICE8A iface
, REFGUID rguid
, LPDIPROPHEADER pdiph
)
873 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
875 TRACE("(%p) %s,%p\n", iface
, debugstr_guid(rguid
), pdiph
);
876 _dump_DIPROPHEADER(pdiph
);
878 if (HIWORD(rguid
)) return DI_OK
;
880 switch (LOWORD(rguid
))
882 case (DWORD
) DIPROP_BUFFERSIZE
:
884 LPDIPROPDWORD pd
= (LPDIPROPDWORD
)pdiph
;
886 if (pdiph
->dwSize
!= sizeof(DIPROPDWORD
)) return DIERR_INVALIDPARAM
;
888 pd
->dwData
= This
->queue_len
;
889 TRACE("buffersize = %d\n", pd
->dwData
);
893 WARN("Unknown property %s\n", debugstr_guid(rguid
));
900 /******************************************************************************
904 HRESULT WINAPI
IDirectInputDevice2AImpl_SetProperty(
905 LPDIRECTINPUTDEVICE8A iface
, REFGUID rguid
, LPCDIPROPHEADER pdiph
)
907 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
909 TRACE("(%p) %s,%p\n", iface
, debugstr_guid(rguid
), pdiph
);
910 _dump_DIPROPHEADER(pdiph
);
912 if (HIWORD(rguid
)) return DI_OK
;
914 switch (LOWORD(rguid
))
916 case (DWORD
) DIPROP_AXISMODE
:
918 LPCDIPROPDWORD pd
= (LPCDIPROPDWORD
)pdiph
;
920 if (pdiph
->dwSize
!= sizeof(DIPROPDWORD
)) return DIERR_INVALIDPARAM
;
921 if (pdiph
->dwHow
== DIPH_DEVICE
&& pdiph
->dwObj
) return DIERR_INVALIDPARAM
;
922 if (This
->acquired
) return DIERR_ACQUIRED
;
923 if (pdiph
->dwHow
!= DIPH_DEVICE
) return DIERR_UNSUPPORTED
;
924 if (!This
->data_format
.user_df
) return DI_OK
;
926 TRACE("Axis mode: %s\n", pd
->dwData
== DIPROPAXISMODE_ABS
? "absolute" :
929 EnterCriticalSection(&This
->crit
);
930 This
->data_format
.user_df
->dwFlags
&= ~DIDFT_AXIS
;
931 This
->data_format
.user_df
->dwFlags
|= pd
->dwData
== DIPROPAXISMODE_ABS
?
932 DIDF_ABSAXIS
: DIDF_RELAXIS
;
933 LeaveCriticalSection(&This
->crit
);
936 case (DWORD
) DIPROP_BUFFERSIZE
:
938 LPCDIPROPDWORD pd
= (LPCDIPROPDWORD
)pdiph
;
940 if (pdiph
->dwSize
!= sizeof(DIPROPDWORD
)) return DIERR_INVALIDPARAM
;
941 if (This
->acquired
) return DIERR_ACQUIRED
;
943 TRACE("buffersize = %d\n", pd
->dwData
);
945 EnterCriticalSection(&This
->crit
);
946 HeapFree(GetProcessHeap(), 0, This
->data_queue
);
948 This
->data_queue
= !pd
->dwData
? NULL
: HeapAlloc(GetProcessHeap(), 0,
949 pd
->dwData
* sizeof(DIDEVICEOBJECTDATA
));
950 This
->queue_head
= This
->queue_tail
= This
->overflow
= 0;
951 This
->queue_len
= pd
->dwData
;
953 LeaveCriticalSection(&This
->crit
);
957 WARN("Unknown property %s\n", debugstr_guid(rguid
));
958 return DIERR_UNSUPPORTED
;
964 HRESULT WINAPI
IDirectInputDevice2AImpl_GetObjectInfo(
965 LPDIRECTINPUTDEVICE8A iface
,
966 LPDIDEVICEOBJECTINSTANCEA pdidoi
,
970 DIDEVICEOBJECTINSTANCEW didoiW
;
974 (pdidoi
->dwSize
!= sizeof(DIDEVICEOBJECTINSTANCEA
) &&
975 pdidoi
->dwSize
!= sizeof(DIDEVICEOBJECTINSTANCE_DX3A
)))
976 return DIERR_INVALIDPARAM
;
978 didoiW
.dwSize
= sizeof(didoiW
);
979 res
= IDirectInputDevice2WImpl_GetObjectInfo((LPDIRECTINPUTDEVICE8W
)iface
, &didoiW
, dwObj
, dwHow
);
982 DWORD dwSize
= pdidoi
->dwSize
;
984 memset(pdidoi
, 0, pdidoi
->dwSize
);
985 pdidoi
->dwSize
= dwSize
;
986 pdidoi
->guidType
= didoiW
.guidType
;
987 pdidoi
->dwOfs
= didoiW
.dwOfs
;
988 pdidoi
->dwType
= didoiW
.dwType
;
989 pdidoi
->dwFlags
= didoiW
.dwFlags
;
995 HRESULT WINAPI
IDirectInputDevice2WImpl_GetObjectInfo(
996 LPDIRECTINPUTDEVICE8W iface
,
997 LPDIDEVICEOBJECTINSTANCEW pdidoi
,
1001 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
1003 LPDIOBJECTDATAFORMAT odf
;
1006 TRACE("(%p) %d(0x%08x) -> %p\n", This
, dwHow
, dwObj
, pdidoi
);
1009 (pdidoi
->dwSize
!= sizeof(DIDEVICEOBJECTINSTANCEW
) &&
1010 pdidoi
->dwSize
!= sizeof(DIDEVICEOBJECTINSTANCE_DX3W
)))
1011 return DIERR_INVALIDPARAM
;
1016 if (!This
->data_format
.offsets
) break;
1017 for (idx
= This
->data_format
.wine_df
->dwNumObjs
- 1; idx
>= 0; idx
--)
1018 if (This
->data_format
.offsets
[idx
] == dwObj
) break;
1021 dwObj
&= 0x00ffffff;
1022 for (idx
= This
->data_format
.wine_df
->dwNumObjs
- 1; idx
>= 0; idx
--)
1023 if ((dataformat_to_odf(This
->data_format
.wine_df
, idx
)->dwType
& 0x00ffffff) == dwObj
)
1028 FIXME("dwHow = DIPH_BYUSAGE not implemented\n");
1031 WARN("invalid parameter: dwHow = %08x\n", dwHow
);
1032 return DIERR_INVALIDPARAM
;
1034 if (idx
< 0) return DIERR_OBJECTNOTFOUND
;
1036 odf
= dataformat_to_odf(This
->data_format
.wine_df
, idx
);
1037 dwSize
= pdidoi
->dwSize
; /* save due to memset below */
1038 memset(pdidoi
, 0, pdidoi
->dwSize
);
1039 pdidoi
->dwSize
= dwSize
;
1040 if (odf
->pguid
) pdidoi
->guidType
= *odf
->pguid
;
1041 pdidoi
->dwOfs
= This
->data_format
.offsets
? This
->data_format
.offsets
[idx
] : odf
->dwOfs
;
1042 pdidoi
->dwType
= odf
->dwType
;
1043 pdidoi
->dwFlags
= odf
->dwFlags
;
1048 HRESULT WINAPI
IDirectInputDevice2AImpl_GetDeviceData(
1049 LPDIRECTINPUTDEVICE8A iface
, DWORD dodsize
, LPDIDEVICEOBJECTDATA dod
,
1050 LPDWORD entries
, DWORD flags
)
1052 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
1053 HRESULT ret
= DI_OK
;
1056 TRACE("(%p) %p -> %p(%d) x%d, 0x%08x\n",
1057 This
, dod
, entries
, entries
? *entries
: 0, dodsize
, flags
);
1059 if (!This
->acquired
)
1060 return DIERR_NOTACQUIRED
;
1061 if (!This
->queue_len
)
1062 return DIERR_NOTBUFFERED
;
1063 if (dodsize
< sizeof(DIDEVICEOBJECTDATA_DX3
))
1064 return DIERR_INVALIDPARAM
;
1066 IDirectInputDevice2_Poll(iface
);
1067 EnterCriticalSection(&This
->crit
);
1069 len
= This
->queue_head
- This
->queue_tail
;
1070 if (len
< 0) len
+= This
->queue_len
;
1072 if ((*entries
!= INFINITE
) && (len
> *entries
)) len
= *entries
;
1077 for (i
= 0; i
< len
; i
++)
1079 int n
= (This
->queue_tail
+ i
) % This
->queue_len
;
1080 memcpy((char *)dod
+ dodsize
* i
, This
->data_queue
+ n
, dodsize
);
1086 ret
= DI_BUFFEROVERFLOW
;
1088 if (!(flags
& DIGDD_PEEK
))
1090 /* Advance reading position */
1091 This
->queue_tail
= (This
->queue_tail
+ len
) % This
->queue_len
;
1092 This
->overflow
= FALSE
;
1095 LeaveCriticalSection(&This
->crit
);
1097 TRACE("Returning %d events queued\n", *entries
);
1101 HRESULT WINAPI
IDirectInputDevice2AImpl_RunControlPanel(
1102 LPDIRECTINPUTDEVICE8A iface
,
1106 FIXME("(this=%p,%p,0x%08x): stub!\n",
1107 iface
, hwndOwner
, dwFlags
);
1112 HRESULT WINAPI
IDirectInputDevice2AImpl_Initialize(
1113 LPDIRECTINPUTDEVICE8A iface
,
1118 FIXME("(this=%p,%p,%d,%s): stub!\n",
1119 iface
, hinst
, dwVersion
, debugstr_guid(rguid
));
1123 /******************************************************************************
1124 * IDirectInputDevice2A
1127 HRESULT WINAPI
IDirectInputDevice2AImpl_CreateEffect(
1128 LPDIRECTINPUTDEVICE8A iface
,
1131 LPDIRECTINPUTEFFECT
*ppdef
,
1132 LPUNKNOWN pUnkOuter
)
1134 FIXME("(this=%p,%s,%p,%p,%p): stub!\n",
1135 iface
, debugstr_guid(rguid
), lpeff
, ppdef
, pUnkOuter
);
1139 HRESULT WINAPI
IDirectInputDevice2AImpl_EnumEffects(
1140 LPDIRECTINPUTDEVICE8A iface
,
1141 LPDIENUMEFFECTSCALLBACKA lpCallback
,
1145 FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
1146 iface
, lpCallback
, lpvRef
, dwFlags
);
1151 HRESULT WINAPI
IDirectInputDevice2WImpl_EnumEffects(
1152 LPDIRECTINPUTDEVICE8W iface
,
1153 LPDIENUMEFFECTSCALLBACKW lpCallback
,
1157 FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
1158 iface
, lpCallback
, lpvRef
, dwFlags
);
1163 HRESULT WINAPI
IDirectInputDevice2AImpl_GetEffectInfo(
1164 LPDIRECTINPUTDEVICE8A iface
,
1165 LPDIEFFECTINFOA lpdei
,
1168 FIXME("(this=%p,%p,%s): stub!\n",
1169 iface
, lpdei
, debugstr_guid(rguid
));
1173 HRESULT WINAPI
IDirectInputDevice2WImpl_GetEffectInfo(
1174 LPDIRECTINPUTDEVICE8W iface
,
1175 LPDIEFFECTINFOW lpdei
,
1178 FIXME("(this=%p,%p,%s): stub!\n",
1179 iface
, lpdei
, debugstr_guid(rguid
));
1183 HRESULT WINAPI
IDirectInputDevice2AImpl_GetForceFeedbackState(
1184 LPDIRECTINPUTDEVICE8A iface
,
1187 FIXME("(this=%p,%p): stub!\n",
1192 HRESULT WINAPI
IDirectInputDevice2AImpl_SendForceFeedbackCommand(
1193 LPDIRECTINPUTDEVICE8A iface
,
1196 TRACE("(%p) 0x%08x:\n", iface
, dwFlags
);
1200 HRESULT WINAPI
IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
1201 LPDIRECTINPUTDEVICE8A iface
,
1202 LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback
,
1206 FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
1207 iface
, lpCallback
, lpvRef
, dwFlags
);
1211 HRESULT WINAPI
IDirectInputDevice2AImpl_Escape(
1212 LPDIRECTINPUTDEVICE8A iface
,
1213 LPDIEFFESCAPE lpDIEEsc
)
1215 FIXME("(this=%p,%p): stub!\n",
1220 HRESULT WINAPI
IDirectInputDevice2AImpl_Poll(
1221 LPDIRECTINPUTDEVICE8A iface
)
1223 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
1225 if (!This
->acquired
) return DIERR_NOTACQUIRED
;
1226 /* Because wine devices do not need to be polled, just return DI_NOEFFECT */
1230 HRESULT WINAPI
IDirectInputDevice2AImpl_SendDeviceData(
1231 LPDIRECTINPUTDEVICE8A iface
,
1233 LPCDIDEVICEOBJECTDATA rgdod
,
1237 FIXME("(this=%p,0x%08x,%p,%p,0x%08x): stub!\n",
1238 iface
, cbObjectData
, rgdod
, pdwInOut
, dwFlags
);
1243 HRESULT WINAPI
IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface
,
1244 LPCSTR lpszFileName
,
1245 LPDIENUMEFFECTSINFILECALLBACK pec
,
1249 FIXME("(%p)->(%s,%p,%p,%08x): stub !\n", iface
, lpszFileName
, pec
, pvRef
, dwFlags
);
1254 HRESULT WINAPI
IDirectInputDevice7WImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8W iface
,
1255 LPCWSTR lpszFileName
,
1256 LPDIENUMEFFECTSINFILECALLBACK pec
,
1260 FIXME("(%p)->(%s,%p,%p,%08x): stub !\n", iface
, debugstr_w(lpszFileName
), pec
, pvRef
, dwFlags
);
1265 HRESULT WINAPI
IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface
,
1266 LPCSTR lpszFileName
,
1268 LPDIFILEEFFECT rgDiFileEft
,
1271 FIXME("(%p)->(%s,%08x,%p,%08x): stub !\n", iface
, lpszFileName
, dwEntries
, rgDiFileEft
, dwFlags
);
1276 HRESULT WINAPI
IDirectInputDevice7WImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8W iface
,
1277 LPCWSTR lpszFileName
,
1279 LPDIFILEEFFECT rgDiFileEft
,
1282 FIXME("(%p)->(%s,%08x,%p,%08x): stub !\n", iface
, debugstr_w(lpszFileName
), dwEntries
, rgDiFileEft
, dwFlags
);
1287 HRESULT WINAPI
IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface
,
1288 LPDIACTIONFORMATA lpdiaf
,
1289 LPCSTR lpszUserName
,
1292 FIXME("(%p)->(%p,%s,%08x): stub !\n", iface
, lpdiaf
, lpszUserName
, dwFlags
);
1293 #define X(x) if (dwFlags & x) FIXME("\tdwFlags =|"#x"\n");
1296 X(DIDBAM_INITIALIZE
)
1297 X(DIDBAM_HWDEFAULTS
)
1299 _dump_diactionformatA(lpdiaf
);
1303 HRESULT WINAPI
IDirectInputDevice8WImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface
,
1304 LPDIACTIONFORMATW lpdiaf
,
1305 LPCWSTR lpszUserName
,
1308 FIXME("(%p)->(%p,%s,%08x): stub !\n", iface
, lpdiaf
, debugstr_w(lpszUserName
), dwFlags
);
1309 #define X(x) if (dwFlags & x) FIXME("\tdwFlags =|"#x"\n");
1312 X(DIDBAM_INITIALIZE
)
1313 X(DIDBAM_HWDEFAULTS
)
1319 HRESULT WINAPI
IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface
,
1320 LPDIACTIONFORMATA lpdiaf
,
1321 LPCSTR lpszUserName
,
1324 FIXME("(%p)->(%p,%s,%08x): stub !\n", iface
, lpdiaf
, lpszUserName
, dwFlags
);
1329 HRESULT WINAPI
IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface
,
1330 LPDIACTIONFORMATW lpdiaf
,
1331 LPCWSTR lpszUserName
,
1334 FIXME("(%p)->(%p,%s,%08x): stub !\n", iface
, lpdiaf
, debugstr_w(lpszUserName
), dwFlags
);
1339 HRESULT WINAPI
IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface
,
1340 LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader
)
1342 FIXME("(%p)->(%p): stub !\n", iface
, lpdiDevImageInfoHeader
);
1347 HRESULT WINAPI
IDirectInputDevice8WImpl_GetImageInfo(LPDIRECTINPUTDEVICE8W iface
,
1348 LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader
)
1350 FIXME("(%p)->(%p): stub !\n", iface
, lpdiDevImageInfoHeader
);