3 * Copyright 1998 Marcus Meissner
5 * Additions (mouse support) Copyright 1998 Lionel Ulmer
9 * - Tomb Raider 2 Demo:
10 * Playable using keyboard only.
11 * - WingCommander Prophecy Demo:
12 * Doesn't get Input Focus.
14 * - Fallout : works great in X and DGA mode
16 * FIXME: The keyboard handling needs to (and will) be merged into keyboard.c
17 * (The current implementation is currently only a proof of concept and
27 #include <sys/signal.h>
34 #include "interfaces.h"
42 extern BYTE InputKeyStateTable
[256];
43 extern int min_keycode
, max_keycode
;
44 extern WORD keyc2vkey
[256];
46 static IDirectInputA_VTable ddiavt
;
47 static IDirectInputDeviceA_VTable SysKeyboardAvt
;
48 static IDirectInputDeviceA_VTable SysMouseAvt
;
50 /* UIDs for Wine "drivers".
51 When enumerating each device supporting DInput, they have two UIDs :
54 static GUID DInput_Wine_Mouse_GUID
= { /* 9e573ed8-7734-11d2-8d4a-23903fb6bdf7 */
58 {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7}
60 static GUID DInput_Wine_Keyboard_GUID
= { /* 0ab8648a-7735-11d2-8c73-71df54a96441 */
64 {0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41}
67 /******************************************************************************
68 * DirectInputCreate32A
70 HRESULT WINAPI
DirectInputCreate32A(HINSTANCE32 hinst
, DWORD dwVersion
, LPDIRECTINPUT32A
*ppDI
, LPUNKNOWN punkOuter
) {
71 TRACE(dinput
, "(0x%08lx,%04lx,%p,%p)\n",
72 (DWORD
)hinst
,dwVersion
,ppDI
,punkOuter
74 (*ppDI
) = (LPDIRECTINPUT32A
)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInput32A
));
76 (*ppDI
)->lpvtbl
= &ddiavt
;
79 /******************************************************************************
80 * IDirectInputA_EnumDevices
82 static HRESULT WINAPI
IDirectInputA_EnumDevices(
83 LPDIRECTINPUT32A
this, DWORD dwDevType
, LPDIENUMDEVICESCALLBACK32A lpCallback
,
84 LPVOID pvRef
, DWORD dwFlags
86 DIDEVICEINSTANCE32A devInstance
;
89 TRACE(dinput
, "(this=%p,0x%04lx,%p,%p,%04lx)\n", this, dwDevType
, lpCallback
, pvRef
, dwFlags
);
91 devInstance
.dwSize
= sizeof(DIDEVICEINSTANCE32A
);
93 if ((dwDevType
== 0) || (dwDevType
== DIDEVTYPE_KEYBOARD
)) {
95 devInstance
.guidInstance
= GUID_SysKeyboard
; /* DInput's GUID */
96 devInstance
.guidProduct
= DInput_Wine_Keyboard_GUID
; /* Vendor's GUID */
97 devInstance
.dwDevType
= DIDEVTYPE_KEYBOARD
| (DIDEVTYPEKEYBOARD_UNKNOWN
<< 8);
98 strcpy(devInstance
.tszInstanceName
, "Keyboard");
99 strcpy(devInstance
.tszProductName
, "Wine Keyboard");
101 ret
= lpCallback(&devInstance
, pvRef
);
102 TRACE(dinput
, "Keyboard registered\n");
104 if (ret
== DIENUM_STOP
)
108 if ((dwDevType
== 0) || (dwDevType
== DIDEVTYPE_KEYBOARD
)) {
110 devInstance
.guidInstance
= GUID_SysMouse
; /* DInput's GUID */
111 devInstance
.guidProduct
= DInput_Wine_Mouse_GUID
; /* Vendor's GUID */
112 devInstance
.dwDevType
= DIDEVTYPE_MOUSE
| (DIDEVTYPEMOUSE_UNKNOWN
<< 8);
113 strcpy(devInstance
.tszInstanceName
, "Mouse");
114 strcpy(devInstance
.tszProductName
, "Wine Mouse");
116 ret
= lpCallback(&devInstance
, pvRef
);
117 TRACE(dinput
, "Mouse registered\n");
120 /* Should also do joystick enumerations.... */
125 static ULONG WINAPI
IDirectInputA_AddRef(LPDIRECTINPUT32A
this) {
126 return ++(this->ref
);
129 static ULONG WINAPI
IDirectInputA_Release(LPDIRECTINPUT32A
this) {
130 if (!(--this->ref
)) {
131 HeapFree(GetProcessHeap(),0,this);
137 static HRESULT WINAPI
IDirectInputA_CreateDevice(
138 LPDIRECTINPUT32A
this,REFGUID rguid
,LPDIRECTINPUTDEVICE32A
* pdev
,
143 WINE_StringFromCLSID(rguid
,xbuf
);
144 FIXME(dinput
,"(this=%p,%s,%p,%p): stub\n",this,xbuf
,pdev
,punk
);
145 if ((!memcmp(&GUID_SysKeyboard
,rguid
,sizeof(GUID_SysKeyboard
))) || /* Generic Keyboard */
146 (!memcmp(&DInput_Wine_Keyboard_GUID
,rguid
,sizeof(GUID_SysKeyboard
)))) { /* Wine Keyboard */
147 *pdev
= HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,sizeof(SysKeyboard32A
));
149 (*pdev
)->lpvtbl
= &SysKeyboardAvt
;
150 memcpy(&((*pdev
)->guid
),rguid
,sizeof(*rguid
));
151 memset(((LPSYSKEYBOARD32A
)(*pdev
))->keystate
,0,256);
154 if ((!memcmp(&GUID_SysMouse
,rguid
,sizeof(GUID_SysMouse
))) || /* Generic Mouse */
155 (!memcmp(&DInput_Wine_Mouse_GUID
,rguid
,sizeof(GUID_SysKeyboard
)))) { /* Wine Mouse */
156 *pdev
= HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,sizeof(SysMouse32A
));
158 (*pdev
)->lpvtbl
= &SysMouseAvt
;
159 memcpy(&((*pdev
)->guid
),rguid
,sizeof(*rguid
));
165 static HRESULT WINAPI
IDirectInputA_QueryInterface(
166 LPDIRECTINPUT32A
this,REFIID riid
,LPVOID
*ppobj
170 WINE_StringFromCLSID(riid
,xbuf
);
171 TRACE(dinput
,"(this=%p,%s,%p)\n",this,xbuf
,ppobj
);
172 if (!memcmp(&IID_IUnknown
,riid
,sizeof(*riid
))) {
173 this->lpvtbl
->fnAddRef(this);
177 if (!memcmp(&IID_IDirectInputA
,riid
,sizeof(*riid
))) {
178 this->lpvtbl
->fnAddRef(this);
185 static HRESULT WINAPI
IDirectInputA_Initialize(
186 LPDIRECTINPUT32A
this,HINSTANCE32 hinst
,DWORD x
188 return DIERR_ALREADYINITIALIZED
;
191 static IDirectInputA_VTable ddiavt
= {
192 IDirectInputA_QueryInterface
,
193 IDirectInputA_AddRef
,
194 IDirectInputA_Release
,
195 IDirectInputA_CreateDevice
,
196 IDirectInputA_EnumDevices
,
199 IDirectInputA_Initialize
202 /******************************************************************************
203 * IDirectInputDeviceA
205 static HRESULT WINAPI
IDirectInputDeviceA_SetDataFormat(
206 LPDIRECTINPUTDEVICE32A
this,LPCDIDATAFORMAT df
210 TRACE(dinput,"(this=%p,%p)\n",this,df);
212 TRACE(dinput,"df.dwSize=%ld\n",df->dwSize);
213 TRACE(dinput,"(df.dwObjsize=%ld)\n",df->dwObjSize);
214 TRACE(dinput,"(df.dwFlags=0x%08lx)\n",df->dwFlags);
215 TRACE(dinput,"(df.dwDataSize=%ld)\n",df->dwDataSize);
216 TRACE(dinput,"(df.dwNumObjs=%ld)\n",df->dwNumObjs);
218 for (i=0;i<df->dwNumObjs;i++) {
221 if (df->rgodf[i].pguid)
222 WINE_StringFromCLSID(df->rgodf[i].pguid,xbuf);
224 strcpy(xbuf,"<no guid>");
225 TRACE(dinput,"df.rgodf[%d].guid %s\n",i,xbuf);
226 TRACE(dinput,"df.rgodf[%d].dwOfs %ld\n",i,df->rgodf[i].dwOfs);
227 TRACE(dinput,"dwType 0x%02lx,dwInstance %ld\n",DIDFT_GETTYPE(df->rgodf[i].dwType),DIDFT_GETINSTANCE(df->rgodf[i].dwType));
228 TRACE(dinput,"df.rgodf[%d].dwFlags 0x%08lx\n",i,df->rgodf[i].dwFlags);
234 static HRESULT WINAPI
IDirectInputDeviceA_SetCooperativeLevel(
235 LPDIRECTINPUTDEVICE32A
this,HWND32 hwnd
,DWORD dwflags
237 FIXME(dinput
,"(this=%p,0x%08lx,0x%08lx): stub\n",this,(DWORD
)hwnd
,dwflags
);
241 static HRESULT WINAPI
IDirectInputDeviceA_SetProperty(
242 LPDIRECTINPUTDEVICE32A
this,REFGUID rguid
,LPCDIPROPHEADER ph
247 WINE_StringFromCLSID(rguid
,xbuf
);
249 sprintf(xbuf
,"<special guid %ld>",(DWORD
)rguid
);
250 TRACE(dinput
,"(this=%p,%s,%p)\n",this,xbuf
,ph
);
251 if (!HIWORD(rguid
)) {
252 switch ((DWORD
)rguid
) {
253 case DIPROP_BUFFERSIZE
: {
254 LPCDIPROPDWORD pd
= (LPCDIPROPDWORD
)ph
;
256 TRACE(dinput
,"buffersize = %ld\n",pd
->dwData
);
260 WARN(dinput
,"Unknown type %ld\n",(DWORD
)rguid
);
267 static HRESULT WINAPI
IDirectInputDeviceA_SetEventNotification(
268 LPDIRECTINPUTDEVICE32A
this,HANDLE32 hnd
270 FIXME(dinput
,"(this=%p,0x%08lx): stub\n",this,(DWORD
)hnd
);
274 static HRESULT WINAPI
IDirectInputDeviceA_GetDeviceData(
275 LPDIRECTINPUTDEVICE32A
this,DWORD dodsize
,LPDIDEVICEOBJECTDATA dod
,
276 LPDWORD entries
,DWORD flags
278 TRACE(dinput
,"IDirectInputDeviceA(%p)->GetDeviceData(%ld,%p,%p(0x%08lx),0x%08lx)\n",
279 this,dodsize
,dod
,entries
,*entries
,flags
);
284 static HRESULT WINAPI
IDirectInputDeviceA_Acquire(LPDIRECTINPUTDEVICE32A
this) {
285 TRACE(dinput
,"(this=%p): stub\n",this);
289 static HRESULT WINAPI
IDirectInputDeviceA_Unacquire(LPDIRECTINPUTDEVICE32A
this) {
290 TRACE(dinput
,"(this=%p): stub\n",this);
294 static ULONG WINAPI
IDirectInputDeviceA_Release(LPDIRECTINPUTDEVICE32A
this) {
298 HeapFree(GetProcessHeap(),0,this);
302 static HRESULT WINAPI
SysKeyboardA_SetProperty(
303 LPDIRECTINPUTDEVICE32A
this,REFGUID rguid
,LPCDIPROPHEADER ph
308 WINE_StringFromCLSID(rguid
,xbuf
);
310 sprintf(xbuf
,"<special guid %ld>",(DWORD
)rguid
);
311 TRACE(dinput
,"(this=%p,%s,%p)\n",this,xbuf
,ph
);
312 TRACE(dinput
,"(size=%ld,headersize=%ld,obj=%ld,how=%ld\n",
313 ph
->dwSize
,ph
->dwHeaderSize
,ph
->dwObj
,ph
->dwHow
);
314 if (!HIWORD(rguid
)) {
315 switch ((DWORD
)rguid
) {
316 case DIPROP_BUFFERSIZE
: {
317 LPCDIPROPDWORD pd
= (LPCDIPROPDWORD
)ph
;
319 TRACE(dinput
,"(buffersize=%ld)\n",pd
->dwData
);
323 WARN(dinput
,"Unknown type %ld\n",(DWORD
)rguid
);
330 static HRESULT WINAPI
SysKeyboardA_GetDeviceState(
331 LPDIRECTINPUTDEVICE32A
this,DWORD len
,LPVOID ptr
337 for (keyc
=min_keycode
;keyc
<max_keycode
;keyc
++)
339 /* X keycode to virtual key */
340 vkey
= keyc2vkey
[keyc
] & 0xFF;
341 /* The windows scancode is keyc-min_keycode */
342 if (InputKeyStateTable
[vkey
]&0x80) {
343 ((LPBYTE
)ptr
)[keyc
-min_keycode
]=0x80;
344 ((LPBYTE
)ptr
)[(keyc
-min_keycode
)|0x80]=0x80;
349 WARN(dinput
,"whoops, SysKeyboardA_GetDeviceState got len %ld?\n",len
);
353 static HRESULT WINAPI
SysKeyboardA_GetDeviceData(
354 LPDIRECTINPUTDEVICE32A
this,DWORD dodsize
,LPDIDEVICEOBJECTDATA dod
,
355 LPDWORD entries
,DWORD flags
357 int keyc
,n
,vkey
,xentries
;
358 LPSYSKEYBOARD32A kthis
= (LPSYSKEYBOARD32A
)this;
360 TRACE(dinput
,"(this=%p,%ld,%p,%p(%ld)),0x%08lx)\n",
361 this,dodsize
,dod
,entries
,entries
?*entries
:0,flags
);
362 EVENT_WaitNetEvent(FALSE
,TRUE
);
370 for (keyc
=min_keycode
;(keyc
<max_keycode
) && (n
<*entries
);keyc
++)
372 /* X keycode to virtual key */
373 vkey
= keyc2vkey
[keyc
] & 0xFF;
374 if (kthis
->keystate
[vkey
] == (InputKeyStateTable
[vkey
]&0x80))
378 dod
[n
].dwOfs
= keyc
-min_keycode
; /* scancode */
379 dod
[n
].dwData
= InputKeyStateTable
[vkey
]&0x80;
380 dod
[n
].dwTimeStamp
= 0; /* umm */
381 dod
[n
].dwSequence
= 0; /* umm */
384 if (!(flags
& DIGDD_PEEK
))
385 kthis
->keystate
[vkey
] = InputKeyStateTable
[vkey
]&0x80;
389 if (n
) fprintf(stderr
,"%d entries\n",n
);
394 static HRESULT WINAPI
SysKeyboardA_Acquire(LPDIRECTINPUTDEVICE32A
this) {
395 TRACE(dinput
,"(this=%p): stub\n",this);
399 static HRESULT WINAPI
SysKeyboardA_Unacquire(LPDIRECTINPUTDEVICE32A
this) {
400 TRACE(dinput
,"(this=%p): stub\n",this);
404 static HRESULT WINAPI
IDirectInputDeviceA_QueryInterface(
405 LPDIRECTINPUTDEVICE32A
this,REFIID riid
,LPVOID
*ppobj
409 WINE_StringFromCLSID(riid
,xbuf
);
410 TRACE(dinput
,"(this=%p,%s,%p)\n",this,xbuf
,ppobj
);
411 if (!memcmp(&IID_IUnknown
,riid
,sizeof(*riid
))) {
412 this->lpvtbl
->fnAddRef(this);
416 if (!memcmp(&IID_IDirectInputDeviceA
,riid
,sizeof(*riid
))) {
417 this->lpvtbl
->fnAddRef(this);
421 if (!memcmp(&IID_IDirectInputDevice2A
,riid
,sizeof(*riid
))) {
422 this->lpvtbl
->fnAddRef(this);
429 static ULONG WINAPI
IDirectInputDeviceA_AddRef(
430 LPDIRECTINPUTDEVICE32A
this)
435 static HRESULT WINAPI
IDirectInputDeviceA_GetCapabilities(
436 LPDIRECTINPUTDEVICE32A
this,
437 LPDIDEVCAPS lpDIDevCaps
)
439 FIXME(dinput
, "stub!\n");
443 static HRESULT WINAPI
IDirectInputDeviceA_EnumObjects(
444 LPDIRECTINPUTDEVICE32A
this,
445 LPDIENUMDEVICEOBJECTSCALLBACK32A lpCallback
,
449 FIXME(dinput
, "stub!\n");
451 lpCallback(NULL
, lpvRef
);
455 static HRESULT WINAPI
IDirectInputDeviceA_GetProperty(
456 LPDIRECTINPUTDEVICE32A
this,
458 LPDIPROPHEADER pdiph
)
460 FIXME(dinput
, "stub!\n");
464 static HRESULT WINAPI
IDirectInputDeviceA_GetObjectInfo(
465 LPDIRECTINPUTDEVICE32A
this,
466 LPDIDEVICEOBJECTINSTANCE32A pdidoi
,
470 FIXME(dinput
, "stub!\n");
474 static HRESULT WINAPI
IDirectInputDeviceA_GetDeviceInfo(
475 LPDIRECTINPUTDEVICE32A
this,
476 LPDIDEVICEINSTANCE32A pdidi
)
478 FIXME(dinput
, "stub!\n");
482 static HRESULT WINAPI
IDirectInputDeviceA_RunControlPanel(
483 LPDIRECTINPUTDEVICE32A
this,
487 FIXME(dinput
, "stub!\n");
491 static HRESULT WINAPI
IDirectInputDeviceA_Initialize(
492 LPDIRECTINPUTDEVICE32A
this,
497 FIXME(dinput
, "stub!\n");
501 /******************************************************************************
502 * IDirectInputDevice2A
505 static HRESULT WINAPI
IDirectInputDevice2A_CreateEffect(
506 LPDIRECTINPUTDEVICE32A
this,
509 LPDIRECTINPUTEFFECT
*ppdef
,
512 FIXME(dinput
, "stub!\n");
516 static HRESULT WINAPI
IDirectInputDevice2A_EnumEffects(
517 LPDIRECTINPUTDEVICE32A
this,
518 LPDIENUMEFFECTSCALLBACKA lpCallback
,
522 FIXME(dinput
, "stub!\n");
524 lpCallback(NULL
, lpvRef
);
528 static HRESULT WINAPI
IDirectInputDevice2A_GetEffectInfo(
529 LPDIRECTINPUTDEVICE32A
this,
530 LPDIEFFECTINFOA lpdei
,
533 FIXME(dinput
, "stub!\n");
537 static HRESULT WINAPI
IDirectInputDevice2A_GetForceFeedbackState(
538 LPDIRECTINPUTDEVICE32A
this,
541 FIXME(dinput
, "stub!\n");
545 static HRESULT WINAPI
IDirectInputDevice2A_SendForceFeedbackCommand(
546 LPDIRECTINPUTDEVICE32A
this,
549 FIXME(dinput
, "stub!\n");
553 static HRESULT WINAPI
IDirectInputDevice2A_EnumCreatedEffectObjects(
554 LPDIRECTINPUTDEVICE32A
this,
555 LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback
,
559 FIXME(dinput
, "stub!\n");
561 lpCallback(NULL
, lpvRef
);
565 static HRESULT WINAPI
IDirectInputDevice2A_Escape(
566 LPDIRECTINPUTDEVICE32A
this,
567 LPDIEFFESCAPE lpDIEEsc
)
569 FIXME(dinput
, "stub!\n");
573 static HRESULT WINAPI
IDirectInputDevice2A_Poll(
574 LPDIRECTINPUTDEVICE32A
this)
576 FIXME(dinput
, "stub!\n");
580 static HRESULT WINAPI
IDirectInputDevice2A_SendDeviceData(
581 LPDIRECTINPUTDEVICE32A
this,
583 LPDIDEVICEOBJECTDATA rgdod
,
587 FIXME(dinput
, "stub!\n");
591 /******************************************************************************
592 * SysMouseA (DInput Mouse support)
595 /******************************************************************************
596 * SetDataFormat : the application can choose the format of the data
597 * the device driver sends back with GetDeviceState.
599 * For the moment, only the "standard" configuration (c_dfDIMouse) is supported
600 * in absolute and relative mode.
602 static HRESULT WINAPI
SysMouseA_SetDataFormat(
603 LPDIRECTINPUTDEVICE32A
this,LPCDIDATAFORMAT df
606 LPSYSMOUSE32A mthis
= (LPSYSMOUSE32A
) this;
608 TRACE(dinput
,"(this=%p,%p)\n",this,df
);
610 TRACE(dinput
,"(df.dwSize=%ld)\n",df
->dwSize
);
611 TRACE(dinput
,"(df.dwObjsize=%ld)\n",df
->dwObjSize
);
612 TRACE(dinput
,"(df.dwFlags=0x%08lx)\n",df
->dwFlags
);
613 TRACE(dinput
,"(df.dwDataSize=%ld)\n",df
->dwDataSize
);
614 TRACE(dinput
,"(df.dwNumObjs=%ld)\n",df
->dwNumObjs
);
616 for (i
=0;i
<df
->dwNumObjs
;i
++) {
619 if (df
->rgodf
[i
].pguid
)
620 WINE_StringFromCLSID(df
->rgodf
[i
].pguid
,xbuf
);
622 strcpy(xbuf
,"<no guid>");
623 TRACE(dinput
,"df.rgodf[%d].guid %s (%p)\n",i
,xbuf
, df
->rgodf
[i
].pguid
);
624 TRACE(dinput
,"df.rgodf[%d].dwOfs %ld\n",i
,df
->rgodf
[i
].dwOfs
);
625 TRACE(dinput
,"dwType 0x%02x,dwInstance %d\n",DIDFT_GETTYPE(df
->rgodf
[i
].dwType
),DIDFT_GETINSTANCE(df
->rgodf
[i
].dwType
));
626 TRACE(dinput
,"df.rgodf[%d].dwFlags 0x%08lx\n",i
,df
->rgodf
[i
].dwFlags
);
629 /* Check size of data format to prevent crashes if the applications
630 sends a smaller buffer */
631 if (df
->dwDataSize
!= sizeof(struct DIMOUSESTATE
)) {
632 FIXME(dinput
, "non-standard mouse configuration not supported yet.");
633 return DIERR_INVALIDPARAM
;
636 /* For the moment, ignore these fields and return always as if
637 c_dfDIMouse was passed as format... */
638 if (df
->dwFlags
== DIDF_ABSAXIS
)
643 /* We need to get the initial "previous" position to be able
647 /* Get the mouse position */
648 EVENT_QueryPointer(&rx
, &ry
, NULL
);
650 /* Fill the initial mouse state structure */
658 /******************************************************************************
659 * GetDeviceState : returns the "state" of the mouse.
661 * For the moment, only the "standard" return structure (DIMOUSESTATE) is
664 static HRESULT WINAPI
SysMouseA_GetDeviceState(
665 LPDIRECTINPUTDEVICE32A
this,DWORD len
,LPVOID ptr
668 struct DIMOUSESTATE
*mstate
= (struct DIMOUSESTATE
*) ptr
;
669 LPSYSMOUSE32A mthis
= (LPSYSMOUSE32A
) this;
671 TRACE(dinput
,"(this=%p,0x%08lx,%p): \n",this,len
,ptr
);
673 /* Check if the buffer is big enough */
674 if (len
< sizeof(struct DIMOUSESTATE
)) {
675 FIXME(dinput
, "unsupported state structure.");
676 return DIERR_INVALIDPARAM
;
679 /* Get the mouse position */
680 EVENT_QueryPointer(&rx
, &ry
, &state
);
681 TRACE(dinput
,"(X:%d - Y:%d)\n", rx
, ry
);
683 /* Fill the mouse state structure */
684 if (mthis
->absolute
) {
688 mstate
->lX
= rx
- mthis
->prevX
;
689 mstate
->lY
= ry
- mthis
->prevY
;
690 /* Fill the previous positions */
695 mstate
->rgbButtons
[0] = (state
& MK_LBUTTON
? 0xFF : 0x00);
696 mstate
->rgbButtons
[1] = (state
& MK_RBUTTON
? 0xFF : 0x00);
697 mstate
->rgbButtons
[2] = (state
& MK_MBUTTON
? 0xFF : 0x00);
698 mstate
->rgbButtons
[3] = 0x00;
705 static IDirectInputDeviceA_VTable SysKeyboardAvt
={
706 IDirectInputDeviceA_QueryInterface
,
707 IDirectInputDeviceA_AddRef
,
708 IDirectInputDeviceA_Release
,
709 IDirectInputDeviceA_GetCapabilities
,
710 IDirectInputDeviceA_EnumObjects
,
711 IDirectInputDeviceA_GetProperty
,
712 SysKeyboardA_SetProperty
,
713 SysKeyboardA_Acquire
,
714 SysKeyboardA_Unacquire
,
715 SysKeyboardA_GetDeviceState
,
716 SysKeyboardA_GetDeviceData
,
717 IDirectInputDeviceA_SetDataFormat
,
718 IDirectInputDeviceA_SetEventNotification
,
719 IDirectInputDeviceA_SetCooperativeLevel
,
720 IDirectInputDeviceA_GetObjectInfo
,
721 IDirectInputDeviceA_GetDeviceInfo
,
722 IDirectInputDeviceA_RunControlPanel
,
723 IDirectInputDeviceA_Initialize
,
724 IDirectInputDevice2A_CreateEffect
,
725 IDirectInputDevice2A_EnumEffects
,
726 IDirectInputDevice2A_GetEffectInfo
,
727 IDirectInputDevice2A_GetForceFeedbackState
,
728 IDirectInputDevice2A_SendForceFeedbackCommand
,
729 IDirectInputDevice2A_EnumCreatedEffectObjects
,
730 IDirectInputDevice2A_Escape
,
731 IDirectInputDevice2A_Poll
,
732 IDirectInputDevice2A_SendDeviceData
,
735 static IDirectInputDeviceA_VTable SysMouseAvt
={
736 IDirectInputDeviceA_QueryInterface
,
737 IDirectInputDeviceA_AddRef
,
738 IDirectInputDeviceA_Release
,
739 IDirectInputDeviceA_GetCapabilities
,
740 IDirectInputDeviceA_EnumObjects
,
741 IDirectInputDeviceA_GetProperty
,
742 IDirectInputDeviceA_SetProperty
,
743 IDirectInputDeviceA_Acquire
,
744 IDirectInputDeviceA_Unacquire
,
745 SysMouseA_GetDeviceState
,
746 IDirectInputDeviceA_GetDeviceData
,
747 SysMouseA_SetDataFormat
,
748 IDirectInputDeviceA_SetEventNotification
,
749 IDirectInputDeviceA_SetCooperativeLevel
,
750 IDirectInputDeviceA_GetObjectInfo
,
751 IDirectInputDeviceA_GetDeviceInfo
,
752 IDirectInputDeviceA_RunControlPanel
,
753 IDirectInputDeviceA_Initialize
,
754 IDirectInputDevice2A_CreateEffect
,
755 IDirectInputDevice2A_EnumEffects
,
756 IDirectInputDevice2A_GetEffectInfo
,
757 IDirectInputDevice2A_GetForceFeedbackState
,
758 IDirectInputDevice2A_SendForceFeedbackCommand
,
759 IDirectInputDevice2A_EnumCreatedEffectObjects
,
760 IDirectInputDevice2A_Escape
,
761 IDirectInputDevice2A_Poll
,
762 IDirectInputDevice2A_SendDeviceData
,