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"
38 #include "device_private.h"
39 #include "dinput_private.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(dinput
);
43 /******************************************************************************
44 * Various debugging tools
46 void _dump_cooperativelevel_DI(DWORD dwFlags
) {
47 if (TRACE_ON(dinput
)) {
53 #define FE(x) { x, #x}
57 FE(DISCL_NONEXCLUSIVE
),
61 for (i
= 0; i
< (sizeof(flags
) / sizeof(flags
[0])); i
++)
62 if (flags
[i
].mask
& dwFlags
)
63 DPRINTF("%s ",flags
[i
].name
);
68 void _dump_EnumObjects_flags(DWORD dwFlags
) {
69 if (TRACE_ON(dinput
)) {
76 #define FE(x) { x, #x}
85 FE(DIDFT_FFEFFECTTRIGGER
),
87 FE(DIDFT_VENDORDEFINED
),
92 type
= (dwFlags
& 0xFF0000FF);
93 instance
= ((dwFlags
>> 8) & 0xFFFF);
95 if (type
== DIDFT_ALL
) {
96 DPRINTF(" DIDFT_ALL");
98 for (i
= 0; i
< (sizeof(flags
) / sizeof(flags
[0])); i
++) {
99 if (flags
[i
].mask
& type
) {
100 type
&= ~flags
[i
].mask
;
101 DPRINTF(" %s",flags
[i
].name
);
105 DPRINTF(" (unhandled: %08x)", type
);
108 DPRINTF(" / Instance: ");
109 if (instance
== ((DIDFT_ANYINSTANCE
>> 8) & 0xFFFF)) {
110 DPRINTF("DIDFT_ANYINSTANCE");
112 DPRINTF("%3d", instance
);
117 void _dump_DIPROPHEADER(LPCDIPROPHEADER diph
) {
118 if (TRACE_ON(dinput
)) {
119 DPRINTF(" - dwObj = 0x%08x\n", diph
->dwObj
);
120 DPRINTF(" - dwHow = %s\n",
121 ((diph
->dwHow
== DIPH_DEVICE
) ? "DIPH_DEVICE" :
122 ((diph
->dwHow
== DIPH_BYOFFSET
) ? "DIPH_BYOFFSET" :
123 ((diph
->dwHow
== DIPH_BYID
)) ? "DIPH_BYID" : "unknown")));
127 void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA
*ddoi
) {
128 if (TRACE_ON(dinput
)) {
129 DPRINTF(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n",
130 debugstr_guid(&ddoi
->guidType
), _dump_dinput_GUID(&ddoi
->guidType
), ddoi
->dwOfs
, ddoi
->dwType
, ddoi
->tszName
);
134 void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW
*ddoi
) {
135 if (TRACE_ON(dinput
)) {
136 DPRINTF(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s\n",
137 debugstr_guid(&ddoi
->guidType
), _dump_dinput_GUID(&ddoi
->guidType
), ddoi
->dwOfs
, ddoi
->dwType
, debugstr_w(ddoi
->tszName
));
141 /* This function is a helper to convert a GUID into any possible DInput GUID out there */
142 const char *_dump_dinput_GUID(const GUID
*guid
) {
144 static const struct {
148 #define FE(x) { &x, #x}
161 FE(GUID_SysKeyboard
),
163 FE(GUID_ConstantForce
),
169 FE(GUID_SawtoothDown
),
179 for (i
= 0; i
< (sizeof(guids
) / sizeof(guids
[0])); i
++) {
180 if (IsEqualGUID(guids
[i
].guid
, guid
)) {
181 return guids
[i
].name
;
184 return "Unknown GUID";
187 void _dump_DIDATAFORMAT(const DIDATAFORMAT
*df
) {
190 TRACE("Dumping DIDATAFORMAT structure:\n");
191 TRACE(" - dwSize: %d\n", df
->dwSize
);
192 if (df
->dwSize
!= sizeof(DIDATAFORMAT
)) {
193 WARN("Non-standard DIDATAFORMAT structure size %d\n", df
->dwSize
);
195 TRACE(" - dwObjsize: %d\n", df
->dwObjSize
);
196 if (df
->dwObjSize
!= sizeof(DIOBJECTDATAFORMAT
)) {
197 WARN("Non-standard DIOBJECTDATAFORMAT structure size %d\n", df
->dwObjSize
);
199 TRACE(" - dwFlags: 0x%08x (", df
->dwFlags
);
200 switch (df
->dwFlags
) {
201 case DIDF_ABSAXIS
: TRACE("DIDF_ABSAXIS"); break;
202 case DIDF_RELAXIS
: TRACE("DIDF_RELAXIS"); break;
203 default: TRACE("unknown"); break;
206 TRACE(" - dwDataSize: %d\n", df
->dwDataSize
);
207 TRACE(" - dwNumObjs: %d\n", df
->dwNumObjs
);
209 for (i
= 0; i
< df
->dwNumObjs
; i
++) {
210 TRACE(" - Object %d:\n", i
);
211 TRACE(" * GUID: %s ('%s')\n", debugstr_guid(df
->rgodf
[i
].pguid
), _dump_dinput_GUID(df
->rgodf
[i
].pguid
));
212 TRACE(" * dwOfs: %d\n", df
->rgodf
[i
].dwOfs
);
213 TRACE(" * dwType: 0x%08x\n", df
->rgodf
[i
].dwType
);
214 TRACE(" "); _dump_EnumObjects_flags(df
->rgodf
[i
].dwType
); TRACE("\n");
215 TRACE(" * dwFlags: 0x%08x\n", df
->rgodf
[i
].dwFlags
);
219 /* Conversion between internal data buffer and external data buffer */
220 void fill_DataFormat(void *out
, const void *in
, DataFormat
*df
) {
222 const char *in_c
= in
;
223 char *out_c
= (char *) out
;
225 if (df
->dt
== NULL
) {
226 /* This means that the app uses Wine's internal data format */
227 memcpy(out
, in
, df
->internal_format_size
);
229 for (i
= 0; i
< df
->size
; i
++) {
230 if (df
->dt
[i
].offset_in
>= 0) {
231 switch (df
->dt
[i
].size
) {
233 TRACE("Copying (c) to %d from %d (value %d)\n",
234 df
->dt
[i
].offset_out
, df
->dt
[i
].offset_in
, *(in_c
+ df
->dt
[i
].offset_in
));
235 *(out_c
+ df
->dt
[i
].offset_out
) = *(in_c
+ df
->dt
[i
].offset_in
);
239 TRACE("Copying (s) to %d from %d (value %d)\n",
240 df
->dt
[i
].offset_out
, df
->dt
[i
].offset_in
, *((const short *)(in_c
+ df
->dt
[i
].offset_in
)));
241 *((short *)(out_c
+ df
->dt
[i
].offset_out
)) = *((const short *)(in_c
+ df
->dt
[i
].offset_in
));
245 TRACE("Copying (i) to %d from %d (value %d)\n",
246 df
->dt
[i
].offset_out
, df
->dt
[i
].offset_in
, *((const int *)(in_c
+ df
->dt
[i
].offset_in
)));
247 *((int *)(out_c
+ df
->dt
[i
].offset_out
)) = *((const int *)(in_c
+ df
->dt
[i
].offset_in
));
251 memcpy((out_c
+ df
->dt
[i
].offset_out
), (in_c
+ df
->dt
[i
].offset_in
), df
->dt
[i
].size
);
255 switch (df
->dt
[i
].size
) {
257 TRACE("Copying (c) to %d default value %d\n",
258 df
->dt
[i
].offset_out
, df
->dt
[i
].value
);
259 *(out_c
+ df
->dt
[i
].offset_out
) = (char) df
->dt
[i
].value
;
263 TRACE("Copying (s) to %d default value %d\n",
264 df
->dt
[i
].offset_out
, df
->dt
[i
].value
);
265 *((short *) (out_c
+ df
->dt
[i
].offset_out
)) = (short) df
->dt
[i
].value
;
269 TRACE("Copying (i) to %d default value %d\n",
270 df
->dt
[i
].offset_out
, df
->dt
[i
].value
);
271 *((int *) (out_c
+ df
->dt
[i
].offset_out
)) = (int) df
->dt
[i
].value
;
275 memset((out_c
+ df
->dt
[i
].offset_out
), 0, df
->dt
[i
].size
);
283 void release_DataFormat(DataFormat
* format
)
285 TRACE("Deleting DataTransform :\n");
287 HeapFree(GetProcessHeap(), 0, format
->dt
);
290 DataFormat
*create_DataFormat(const DIDATAFORMAT
*wine_format
, LPCDIDATAFORMAT asked_format
, int *offset
) {
299 ret
= HeapAlloc(GetProcessHeap(), 0, sizeof(DataFormat
));
301 done
= HeapAlloc(GetProcessHeap(), 0, sizeof(int) * asked_format
->dwNumObjs
);
302 memset(done
, 0, sizeof(int) * asked_format
->dwNumObjs
);
304 dt
= HeapAlloc(GetProcessHeap(), 0, asked_format
->dwNumObjs
* sizeof(DataTransform
));
306 TRACE("Creating DataTransform :\n");
308 for (i
= 0; i
< wine_format
->dwNumObjs
; i
++) {
311 for (j
= 0; j
< asked_format
->dwNumObjs
; j
++) {
315 if (/* Check if the application either requests any GUID and if not, it if matches
316 * the GUID of the Wine object.
318 ((asked_format
->rgodf
[j
].pguid
== NULL
) ||
319 (wine_format
->rgodf
[i
].pguid
== NULL
) ||
320 (IsEqualGUID(wine_format
->rgodf
[i
].pguid
, asked_format
->rgodf
[j
].pguid
)))
322 (/* Then check if it accepts any instance id, and if not, if it matches Wine's
325 (DIDFT_GETINSTANCE(asked_format
->rgodf
[j
].dwType
) == 0xFFFF) ||
326 (DIDFT_GETINSTANCE(asked_format
->rgodf
[j
].dwType
) == 0x00FF) || /* This is mentionned in no DX docs, but it works fine - tested on WinXP */
327 (DIDFT_GETINSTANCE(asked_format
->rgodf
[j
].dwType
) == DIDFT_GETINSTANCE(wine_format
->rgodf
[i
].dwType
)))
329 ( /* Then if the asked type matches the one Wine provides */
330 wine_format
->rgodf
[i
].dwType
& asked_format
->rgodf
[j
].dwType
)) {
334 TRACE("Matching :\n");
335 TRACE(" - Asked (%d) :\n", j
);
336 TRACE(" * GUID: %s ('%s')\n",
337 debugstr_guid(asked_format
->rgodf
[j
].pguid
),
338 _dump_dinput_GUID(asked_format
->rgodf
[j
].pguid
));
339 TRACE(" * Offset: %3d\n", asked_format
->rgodf
[j
].dwOfs
);
340 TRACE(" * dwType: %08x\n", asked_format
->rgodf
[j
].dwType
);
341 TRACE(" "); _dump_EnumObjects_flags(asked_format
->rgodf
[j
].dwType
); TRACE("\n");
343 TRACE(" - Wine (%d) :\n", i
);
344 TRACE(" * GUID: %s ('%s')\n",
345 debugstr_guid(wine_format
->rgodf
[i
].pguid
),
346 _dump_dinput_GUID(wine_format
->rgodf
[i
].pguid
));
347 TRACE(" * Offset: %3d\n", wine_format
->rgodf
[i
].dwOfs
);
348 TRACE(" * dwType: %08x\n", wine_format
->rgodf
[i
].dwType
);
349 TRACE(" "); _dump_EnumObjects_flags(wine_format
->rgodf
[i
].dwType
); TRACE("\n");
351 if (wine_format
->rgodf
[i
].dwType
& DIDFT_BUTTON
)
352 dt
[index
].size
= sizeof(BYTE
);
354 dt
[index
].size
= sizeof(DWORD
);
355 dt
[index
].offset_in
= wine_format
->rgodf
[i
].dwOfs
;
356 if (asked_format
->rgodf
[j
].dwOfs
< next
) {
357 WARN("bad format: dwOfs=%d, changing to %d\n", asked_format
->rgodf
[j
].dwOfs
, next
);
358 dt
[index
].offset_out
= next
;
361 dt
[index
].offset_out
= asked_format
->rgodf
[j
].dwOfs
;
362 offset
[i
] = asked_format
->rgodf
[j
].dwOfs
;
365 next
= next
+ dt
[index
].size
;
367 if (wine_format
->rgodf
[i
].dwOfs
!= dt
[index
].offset_out
)
375 if (j
== asked_format
->dwNumObjs
)
379 TRACE("Setting to default value :\n");
380 for (j
= 0; j
< asked_format
->dwNumObjs
; j
++) {
382 TRACE(" - Asked (%d) :\n", j
);
383 TRACE(" * GUID: %s ('%s')\n",
384 debugstr_guid(asked_format
->rgodf
[j
].pguid
),
385 _dump_dinput_GUID(asked_format
->rgodf
[j
].pguid
));
386 TRACE(" * Offset: %3d\n", asked_format
->rgodf
[j
].dwOfs
);
387 TRACE(" * dwType: %08x\n", asked_format
->rgodf
[j
].dwType
);
388 TRACE(" "); _dump_EnumObjects_flags(asked_format
->rgodf
[j
].dwType
); TRACE("\n");
390 if (asked_format
->rgodf
[j
].dwType
& DIDFT_BUTTON
)
391 dt
[index
].size
= sizeof(BYTE
);
393 dt
[index
].size
= sizeof(DWORD
);
394 dt
[index
].offset_in
= -1;
395 dt
[index
].offset_out
= asked_format
->rgodf
[j
].dwOfs
;
403 ret
->internal_format_size
= wine_format
->dwDataSize
;
407 HeapFree(GetProcessHeap(), 0, dt
);
412 HeapFree(GetProcessHeap(), 0, done
);
417 BOOL
DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA lpddi
, LPVOID lpvRef
) {
418 DIDEVICEOBJECTINSTANCEW ddtmp
;
419 device_enumobjects_AtoWcb_data
* data
;
421 data
= (device_enumobjects_AtoWcb_data
*) lpvRef
;
423 memset(&ddtmp
, 0, sizeof(ddtmp
));
425 ddtmp
.dwSize
= sizeof(DIDEVICEINSTANCEW
);
426 ddtmp
.guidType
= lpddi
->guidType
;
427 ddtmp
.dwOfs
= lpddi
->dwOfs
;
428 ddtmp
.dwType
= lpddi
->dwType
;
429 ddtmp
.dwFlags
= lpddi
->dwFlags
;
430 MultiByteToWideChar(CP_ACP
, 0, lpddi
->tszName
, -1, ddtmp
.tszName
, MAX_PATH
);
432 if (lpddi
->dwSize
== sizeof(DIDEVICEINSTANCEA
)) {
434 * if dwSize < sizeof(DIDEVICEINSTANCEA of DInput version >= 5)
435 * force feedback and other newer datas aren't available
437 ddtmp
.dwFFMaxForce
= lpddi
->dwFFMaxForce
;
438 ddtmp
.dwFFForceResolution
= lpddi
->dwFFForceResolution
;
439 ddtmp
.wCollectionNumber
= lpddi
->wCollectionNumber
;
440 ddtmp
.wDesignatorIndex
= lpddi
->wDesignatorIndex
;
441 ddtmp
.wUsagePage
= lpddi
->wUsagePage
;
442 ddtmp
.wUsage
= lpddi
->wUsage
;
443 ddtmp
.dwDimension
= lpddi
->dwDimension
;
444 ddtmp
.wExponent
= lpddi
->wExponent
;
445 ddtmp
.wReserved
= lpddi
->wReserved
;
447 return data
->lpCallBack(&ddtmp
, data
->lpvRef
);
450 /******************************************************************************
451 * IDirectInputDeviceA
454 HRESULT WINAPI
IDirectInputDevice2AImpl_SetDataFormat(
455 LPDIRECTINPUTDEVICE8A iface
,LPCDIDATAFORMAT df
457 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
459 TRACE("(this=%p,%p)\n",This
,df
);
461 _dump_DIDATAFORMAT(df
);
466 /******************************************************************************
467 * SetCooperativeLevel
469 * Set cooperative level and the source window for the events.
471 HRESULT WINAPI
IDirectInputDevice2AImpl_SetCooperativeLevel(
472 LPDIRECTINPUTDEVICE8A iface
, HWND hwnd
, DWORD dwflags
)
474 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
476 TRACE("(%p) %p,0x%08x\n", This
, hwnd
, dwflags
);
477 TRACE(" cooperative level : ");
478 _dump_cooperativelevel_DI(dwflags
);
480 if ((dwflags
& (DISCL_EXCLUSIVE
| DISCL_NONEXCLUSIVE
)) == 0 ||
481 (dwflags
& (DISCL_EXCLUSIVE
| DISCL_NONEXCLUSIVE
)) == (DISCL_EXCLUSIVE
| DISCL_NONEXCLUSIVE
) ||
482 (dwflags
& (DISCL_FOREGROUND
| DISCL_BACKGROUND
)) == 0 ||
483 (dwflags
& (DISCL_FOREGROUND
| DISCL_BACKGROUND
)) == (DISCL_FOREGROUND
| DISCL_BACKGROUND
))
484 return DIERR_INVALIDPARAM
;
486 if (dwflags
== (DISCL_NONEXCLUSIVE
| DISCL_BACKGROUND
))
487 hwnd
= GetDesktopWindow();
489 if (!hwnd
) return E_HANDLE
;
491 /* For security reasons native does not allow exclusive background level
492 for mouse and keyboard only */
493 if (dwflags
& DISCL_EXCLUSIVE
&& dwflags
& DISCL_BACKGROUND
&&
494 (IsEqualGUID(&This
->guid
, &GUID_SysMouse
) ||
495 IsEqualGUID(&This
->guid
, &GUID_SysKeyboard
)))
496 return DIERR_UNSUPPORTED
;
498 /* Store the window which asks for the mouse */
500 This
->dwCoopLevel
= dwflags
;
505 /******************************************************************************
506 * SetEventNotification : specifies event to be sent on state change
508 HRESULT WINAPI
IDirectInputDevice2AImpl_SetEventNotification(
509 LPDIRECTINPUTDEVICE8A iface
, HANDLE event
)
511 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
513 TRACE("(%p) %p\n", This
, event
);
515 This
->hEvent
= event
;
519 ULONG WINAPI
IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface
)
521 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
523 ref
= InterlockedDecrement(&(This
->ref
));
525 HeapFree(GetProcessHeap(),0,This
);
529 HRESULT WINAPI
IDirectInputDevice2AImpl_QueryInterface(
530 LPDIRECTINPUTDEVICE8A iface
,REFIID riid
,LPVOID
*ppobj
533 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
535 TRACE("(this=%p,%s,%p)\n",This
,debugstr_guid(riid
),ppobj
);
536 if (IsEqualGUID(&IID_IUnknown
,riid
)) {
537 IDirectInputDevice2_AddRef(iface
);
541 if (IsEqualGUID(&IID_IDirectInputDeviceA
,riid
)) {
542 IDirectInputDevice2_AddRef(iface
);
546 if (IsEqualGUID(&IID_IDirectInputDevice2A
,riid
)) {
547 IDirectInputDevice2_AddRef(iface
);
551 if (IsEqualGUID(&IID_IDirectInputDevice7A
,riid
)) {
552 IDirectInputDevice7_AddRef(iface
);
556 if (IsEqualGUID(&IID_IDirectInputDevice8A
,riid
)) {
557 IDirectInputDevice8_AddRef(iface
);
561 TRACE("Unsupported interface !\n");
565 HRESULT WINAPI
IDirectInputDevice2WImpl_QueryInterface(
566 LPDIRECTINPUTDEVICE8W iface
,REFIID riid
,LPVOID
*ppobj
569 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
571 TRACE("(this=%p,%s,%p)\n",This
,debugstr_guid(riid
),ppobj
);
572 if (IsEqualGUID(&IID_IUnknown
,riid
)) {
573 IDirectInputDevice2_AddRef(iface
);
577 if (IsEqualGUID(&IID_IDirectInputDeviceW
,riid
)) {
578 IDirectInputDevice2_AddRef(iface
);
582 if (IsEqualGUID(&IID_IDirectInputDevice2W
,riid
)) {
583 IDirectInputDevice2_AddRef(iface
);
587 if (IsEqualGUID(&IID_IDirectInputDevice7W
,riid
)) {
588 IDirectInputDevice7_AddRef(iface
);
592 if (IsEqualGUID(&IID_IDirectInputDevice8W
,riid
)) {
593 IDirectInputDevice8_AddRef(iface
);
597 TRACE("Unsupported interface !\n");
601 ULONG WINAPI
IDirectInputDevice2AImpl_AddRef(
602 LPDIRECTINPUTDEVICE8A iface
)
604 IDirectInputDevice2AImpl
*This
= (IDirectInputDevice2AImpl
*)iface
;
605 return InterlockedIncrement(&(This
->ref
));
608 HRESULT WINAPI
IDirectInputDevice2AImpl_EnumObjects(
609 LPDIRECTINPUTDEVICE8A iface
,
610 LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback
,
614 FIXME("(this=%p,%p,%p,%08x): stub!\n", iface
, lpCallback
, lpvRef
, dwFlags
);
615 if (TRACE_ON(dinput
)) {
616 DPRINTF(" - flags = ");
617 _dump_EnumObjects_flags(dwFlags
);
624 HRESULT WINAPI
IDirectInputDevice2WImpl_EnumObjects(
625 LPDIRECTINPUTDEVICE8W iface
,
626 LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback
,
630 FIXME("(this=%p,%p,%p,%08x): stub!\n", iface
, lpCallback
, lpvRef
, dwFlags
);
631 if (TRACE_ON(dinput
)) {
632 DPRINTF(" - flags = ");
633 _dump_EnumObjects_flags(dwFlags
);
640 HRESULT WINAPI
IDirectInputDevice2AImpl_GetProperty(
641 LPDIRECTINPUTDEVICE8A iface
,
643 LPDIPROPHEADER pdiph
)
645 FIXME("(this=%p,%s,%p): stub!\n",
646 iface
, debugstr_guid(rguid
), pdiph
);
648 if (TRACE_ON(dinput
))
649 _dump_DIPROPHEADER(pdiph
);
654 HRESULT WINAPI
IDirectInputDevice2AImpl_GetObjectInfo(
655 LPDIRECTINPUTDEVICE8A iface
,
656 LPDIDEVICEOBJECTINSTANCEA pdidoi
,
660 FIXME("(this=%p,%p,%d,0x%08x): stub!\n",
661 iface
, pdidoi
, dwObj
, dwHow
);
666 HRESULT WINAPI
IDirectInputDevice2WImpl_GetObjectInfo(
667 LPDIRECTINPUTDEVICE8W iface
,
668 LPDIDEVICEOBJECTINSTANCEW pdidoi
,
672 FIXME("(this=%p,%p,%d,0x%08x): stub!\n",
673 iface
, pdidoi
, dwObj
, dwHow
);
678 HRESULT WINAPI
IDirectInputDevice2AImpl_GetDeviceInfo(
679 LPDIRECTINPUTDEVICE8A iface
,
680 LPDIDEVICEINSTANCEA pdidi
)
682 FIXME("(this=%p,%p): stub!\n",
688 HRESULT WINAPI
IDirectInputDevice2WImpl_GetDeviceInfo(
689 LPDIRECTINPUTDEVICE8W iface
,
690 LPDIDEVICEINSTANCEW pdidi
)
692 FIXME("(this=%p,%p): stub!\n",
698 HRESULT WINAPI
IDirectInputDevice2AImpl_RunControlPanel(
699 LPDIRECTINPUTDEVICE8A iface
,
703 FIXME("(this=%p,%p,0x%08x): stub!\n",
704 iface
, hwndOwner
, dwFlags
);
709 HRESULT WINAPI
IDirectInputDevice2AImpl_Initialize(
710 LPDIRECTINPUTDEVICE8A iface
,
715 FIXME("(this=%p,%p,%d,%s): stub!\n",
716 iface
, hinst
, dwVersion
, debugstr_guid(rguid
));
720 /******************************************************************************
721 * IDirectInputDevice2A
724 HRESULT WINAPI
IDirectInputDevice2AImpl_CreateEffect(
725 LPDIRECTINPUTDEVICE8A iface
,
728 LPDIRECTINPUTEFFECT
*ppdef
,
731 FIXME("(this=%p,%s,%p,%p,%p): stub!\n",
732 iface
, debugstr_guid(rguid
), lpeff
, ppdef
, pUnkOuter
);
736 HRESULT WINAPI
IDirectInputDevice2AImpl_EnumEffects(
737 LPDIRECTINPUTDEVICE8A iface
,
738 LPDIENUMEFFECTSCALLBACKA lpCallback
,
742 FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
743 iface
, lpCallback
, lpvRef
, dwFlags
);
748 HRESULT WINAPI
IDirectInputDevice2WImpl_EnumEffects(
749 LPDIRECTINPUTDEVICE8W iface
,
750 LPDIENUMEFFECTSCALLBACKW lpCallback
,
754 FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
755 iface
, lpCallback
, lpvRef
, dwFlags
);
760 HRESULT WINAPI
IDirectInputDevice2AImpl_GetEffectInfo(
761 LPDIRECTINPUTDEVICE8A iface
,
762 LPDIEFFECTINFOA lpdei
,
765 FIXME("(this=%p,%p,%s): stub!\n",
766 iface
, lpdei
, debugstr_guid(rguid
));
770 HRESULT WINAPI
IDirectInputDevice2WImpl_GetEffectInfo(
771 LPDIRECTINPUTDEVICE8W iface
,
772 LPDIEFFECTINFOW lpdei
,
775 FIXME("(this=%p,%p,%s): stub!\n",
776 iface
, lpdei
, debugstr_guid(rguid
));
780 HRESULT WINAPI
IDirectInputDevice2AImpl_GetForceFeedbackState(
781 LPDIRECTINPUTDEVICE8A iface
,
784 FIXME("(this=%p,%p): stub!\n",
789 HRESULT WINAPI
IDirectInputDevice2AImpl_SendForceFeedbackCommand(
790 LPDIRECTINPUTDEVICE8A iface
,
793 FIXME("(this=%p,0x%08x): stub!\n",
798 HRESULT WINAPI
IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
799 LPDIRECTINPUTDEVICE8A iface
,
800 LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback
,
804 FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
805 iface
, lpCallback
, lpvRef
, dwFlags
);
809 HRESULT WINAPI
IDirectInputDevice2AImpl_Escape(
810 LPDIRECTINPUTDEVICE8A iface
,
811 LPDIEFFESCAPE lpDIEEsc
)
813 FIXME("(this=%p,%p): stub!\n",
818 HRESULT WINAPI
IDirectInputDevice2AImpl_Poll(
819 LPDIRECTINPUTDEVICE8A iface
)
821 /* Because wine devices do not need to be polled, just return DI_NOEFFECT */
825 HRESULT WINAPI
IDirectInputDevice2AImpl_SendDeviceData(
826 LPDIRECTINPUTDEVICE8A iface
,
828 LPCDIDEVICEOBJECTDATA rgdod
,
832 FIXME("(this=%p,0x%08x,%p,%p,0x%08x): stub!\n",
833 iface
, cbObjectData
, rgdod
, pdwInOut
, dwFlags
);
838 HRESULT WINAPI
IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface
,
840 LPDIENUMEFFECTSINFILECALLBACK pec
,
844 FIXME("(%p)->(%s,%p,%p,%08x): stub !\n", iface
, lpszFileName
, pec
, pvRef
, dwFlags
);
849 HRESULT WINAPI
IDirectInputDevice7WImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8W iface
,
850 LPCWSTR lpszFileName
,
851 LPDIENUMEFFECTSINFILECALLBACK pec
,
855 FIXME("(%p)->(%s,%p,%p,%08x): stub !\n", iface
, debugstr_w(lpszFileName
), pec
, pvRef
, dwFlags
);
860 HRESULT WINAPI
IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface
,
863 LPDIFILEEFFECT rgDiFileEft
,
866 FIXME("(%p)->(%s,%08x,%p,%08x): stub !\n", iface
, lpszFileName
, dwEntries
, rgDiFileEft
, dwFlags
);
871 HRESULT WINAPI
IDirectInputDevice7WImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8W iface
,
872 LPCWSTR lpszFileName
,
874 LPDIFILEEFFECT rgDiFileEft
,
877 FIXME("(%p)->(%s,%08x,%p,%08x): stub !\n", iface
, debugstr_w(lpszFileName
), dwEntries
, rgDiFileEft
, dwFlags
);
882 HRESULT WINAPI
IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface
,
883 LPDIACTIONFORMATA lpdiaf
,
887 FIXME("(%p)->(%p,%s,%08x): stub !\n", iface
, lpdiaf
, lpszUserName
, dwFlags
);
892 HRESULT WINAPI
IDirectInputDevice8WImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface
,
893 LPDIACTIONFORMATW lpdiaf
,
894 LPCWSTR lpszUserName
,
897 FIXME("(%p)->(%p,%s,%08x): stub !\n", iface
, lpdiaf
, debugstr_w(lpszUserName
), dwFlags
);
902 HRESULT WINAPI
IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface
,
903 LPDIACTIONFORMATA lpdiaf
,
907 FIXME("(%p)->(%p,%s,%08x): stub !\n", iface
, lpdiaf
, lpszUserName
, dwFlags
);
912 HRESULT WINAPI
IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface
,
913 LPDIACTIONFORMATW lpdiaf
,
914 LPCWSTR lpszUserName
,
917 FIXME("(%p)->(%p,%s,%08x): stub !\n", iface
, lpdiaf
, debugstr_w(lpszUserName
), dwFlags
);
922 HRESULT WINAPI
IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface
,
923 LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader
)
925 FIXME("(%p)->(%p): stub !\n", iface
, lpdiDevImageInfoHeader
);
930 HRESULT WINAPI
IDirectInputDevice8WImpl_GetImageInfo(LPDIRECTINPUTDEVICE8W iface
,
931 LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader
)
933 FIXME("(%p)->(%p): stub !\n", iface
, lpdiDevImageInfoHeader
);