Commit c405019e authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

- DInput WideChar classes support. This time all dinput versions have

widechar classes. - fix a stupid bug in callback handling caught by Lionel. - add some forgotten IID on class factory (better if we want to active the code) - many cleanups on COM Macros (don't need A and W variants as they are the same)
parent bf2121a3
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <string.h> #include <string.h>
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
#include "winbase.h" #include "winbase.h"
#include "winerror.h" #include "winerror.h"
#include "windef.h" #include "windef.h"
...@@ -107,6 +108,13 @@ void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) { ...@@ -107,6 +108,13 @@ void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) {
} }
} }
void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW *ddoi) {
if (TRACE_ON(dinput)) {
DPRINTF(" - enumerating : %s - %2ld - 0x%08lx - %s\n",
debugstr_guid(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName));
}
}
/* Conversion between internal data buffer and external data buffer */ /* Conversion between internal data buffer and external data buffer */
void fill_DataFormat(void *out, void *in, DataFormat *df) { void fill_DataFormat(void *out, void *in, DataFormat *df) {
int i; int i;
...@@ -267,6 +275,39 @@ DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_f ...@@ -267,6 +275,39 @@ DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_f
return ret; return ret;
} }
BOOL DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA lpddi, LPVOID lpvRef) {
DIDEVICEOBJECTINSTANCEW ddtmp;
device_enumobjects_AtoWcb_data* data;
data = (device_enumobjects_AtoWcb_data*) lpvRef;
memset(&ddtmp, 0, sizeof(DIDEVICEINSTANCEW));
ddtmp.dwSize = sizeof(DIDEVICEINSTANCEW);
ddtmp.guidType = lpddi->guidType;
ddtmp.dwOfs = lpddi->dwOfs;
ddtmp.dwType = lpddi->dwType;
ddtmp.dwFlags = lpddi->dwFlags;
MultiByteToWideChar(CP_ACP, 0, lpddi->tszName, -1, ddtmp.tszName, MAX_PATH);
if (lpddi->dwSize == sizeof(DIDEVICEINSTANCEA)) {
/**
* if dwSize < sizeof(DIDEVICEINSTANCEA of DInput version >= 5)
* force feedback and other newer datas aren't available
*/
ddtmp.dwFFMaxForce = lpddi->dwFFMaxForce;
ddtmp.dwFFForceResolution = lpddi->dwFFForceResolution;
ddtmp.wCollectionNumber = lpddi->wCollectionNumber;
ddtmp.wDesignatorIndex = lpddi->wDesignatorIndex;
ddtmp.wUsagePage = lpddi->wUsagePage;
ddtmp.wUsage = lpddi->wUsage;
ddtmp.dwDimension = lpddi->dwDimension;
ddtmp.wExponent = lpddi->wExponent;
ddtmp.wReserved = lpddi->wReserved;
}
return data->lpCallBack(&ddtmp, data->lpvRef);
}
/****************************************************************************** /******************************************************************************
* IDirectInputDeviceA * IDirectInputDeviceA
*/ */
...@@ -355,6 +396,37 @@ HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface( ...@@ -355,6 +396,37 @@ HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
return E_FAIL; return E_FAIL;
} }
HRESULT WINAPI IDirectInputDevice2WImpl_QueryInterface(
LPDIRECTINPUTDEVICE8W iface,REFIID riid,LPVOID *ppobj
)
{
ICOM_THIS(IDirectInputDevice2AImpl,iface);
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(&IID_IUnknown,riid)) {
IDirectInputDevice2_AddRef(iface);
*ppobj = This;
return DI_OK;
}
if (IsEqualGUID(&IID_IDirectInputDeviceW,riid)) {
IDirectInputDevice2_AddRef(iface);
*ppobj = This;
return DI_OK;
}
if (IsEqualGUID(&IID_IDirectInputDevice2W,riid)) {
IDirectInputDevice2_AddRef(iface);
*ppobj = This;
return DI_OK;
}
if (IsEqualGUID(&IID_IDirectInputDevice7W,riid)) {
IDirectInputDevice7_AddRef(iface);
*ppobj = This;
return DI_OK;
}
TRACE("Unsupported interface !\n");
return E_FAIL;
}
ULONG WINAPI IDirectInputDevice2AImpl_AddRef( ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
LPDIRECTINPUTDEVICE8A iface) LPDIRECTINPUTDEVICE8A iface)
{ {
...@@ -378,6 +450,22 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects( ...@@ -378,6 +450,22 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice2WImpl_EnumObjects(
LPDIRECTINPUTDEVICE8W iface,
LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
LPVOID lpvRef,
DWORD dwFlags)
{
FIXME("(this=%p,%p,%p,%08lx): stub!\n", iface, lpCallback, lpvRef, dwFlags);
if (TRACE_ON(dinput)) {
DPRINTF(" - flags = ");
_dump_EnumObjects_flags(dwFlags);
DPRINTF("\n");
}
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty( HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid, REFGUID rguid,
...@@ -404,6 +492,18 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo( ...@@ -404,6 +492,18 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo(
LPDIRECTINPUTDEVICE8W iface,
LPDIDEVICEOBJECTINSTANCEW pdidoi,
DWORD dwObj,
DWORD dwHow)
{
FIXME("(this=%p,%p,%ld,0x%08lx): stub!\n",
iface, pdidoi, dwObj, dwHow);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo( HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEINSTANCEA pdidi) LPDIDEVICEINSTANCEA pdidi)
...@@ -413,6 +513,15 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo( ...@@ -413,6 +513,15 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice2WImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE8W iface,
LPDIDEVICEINSTANCEW pdidi)
{
FIXME("(this=%p,%p): stub!\n",
iface, pdidi);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel( HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
...@@ -466,6 +575,20 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects( ...@@ -466,6 +575,20 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice2WImpl_EnumEffects(
LPDIRECTINPUTDEVICE8W iface,
LPDIENUMEFFECTSCALLBACKW lpCallback,
LPVOID lpvRef,
DWORD dwFlags)
{
FIXME("(this=%p,%p,%p,0x%08lx): stub!\n",
iface, lpCallback, lpvRef, dwFlags);
if (lpCallback)
lpCallback(NULL, lpvRef);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo( HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIEFFECTINFOA lpdei, LPDIEFFECTINFOA lpdei,
...@@ -476,6 +599,16 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo( ...@@ -476,6 +599,16 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice2WImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE8W iface,
LPDIEFFECTINFOW lpdei,
REFGUID rguid)
{
FIXME("(this=%p,%p,%s): stub!\n",
iface, lpdei, debugstr_guid(rguid));
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState( HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
LPDWORD pdwOut) LPDWORD pdwOut)
...@@ -547,6 +680,17 @@ HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A ...@@ -547,6 +680,17 @@ HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice7WImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8W iface,
LPCWSTR lpszFileName,
LPDIENUMEFFECTSINFILECALLBACK pec,
LPVOID pvRef,
DWORD dwFlags)
{
FIXME("(%p)->(%s,%p,%p,%08lx): stub !\n", iface, debugstr_w(lpszFileName), pec, pvRef, dwFlags);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface, HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName, LPCSTR lpszFileName,
DWORD dwEntries, DWORD dwEntries,
...@@ -558,6 +702,17 @@ HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A ...@@ -558,6 +702,17 @@ HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice7WImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8W iface,
LPCWSTR lpszFileName,
DWORD dwEntries,
LPDIFILEEFFECT rgDiFileEft,
DWORD dwFlags)
{
FIXME("(%p)->(%s,%08lx,%p,%08lx): stub !\n", iface, debugstr_w(lpszFileName), dwEntries, rgDiFileEft, dwFlags);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface, HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
LPDIACTIONFORMATA lpdiaf, LPDIACTIONFORMATA lpdiaf,
LPCSTR lpszUserName, LPCSTR lpszUserName,
...@@ -568,6 +723,16 @@ HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A ifa ...@@ -568,6 +723,16 @@ HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A ifa
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice8WImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
LPDIACTIONFORMATW lpdiaf,
LPCWSTR lpszUserName,
DWORD dwFlags)
{
FIXME("(%p)->(%p,%s,%08lx): stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface, HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
LPDIACTIONFORMATA lpdiaf, LPDIACTIONFORMATA lpdiaf,
LPCSTR lpszUserName, LPCSTR lpszUserName,
...@@ -578,6 +743,16 @@ HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface ...@@ -578,6 +743,16 @@ HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface,
LPDIACTIONFORMATW lpdiaf,
LPCWSTR lpszUserName,
DWORD dwFlags)
{
FIXME("(%p)->(%p,%s,%08lx): stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface, HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader)
{ {
...@@ -585,3 +760,11 @@ HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface ...@@ -585,3 +760,11 @@ HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice8WImpl_GetImageInfo(LPDIRECTINPUTDEVICE8W iface,
LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader)
{
FIXME("(%p)->(%p): stub !\n", iface, lpdiDevImageInfoHeader);
return DI_OK;
}
...@@ -70,12 +70,24 @@ extern DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT ...@@ -70,12 +70,24 @@ extern DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT
} \ } \
} }
/**
* Callback Data used by specific callback
* for EnumObject on 'W' interfaces
*/
typedef struct {
LPDIENUMDEVICEOBJECTSCALLBACKW lpCallBack;
LPVOID lpvRef;
} device_enumobjects_AtoWcb_data;
extern BOOL DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
/* Various debug tools */ /* Various debug tools */
extern void _dump_cooperativelevel_DI(DWORD dwFlags) ; extern void _dump_cooperativelevel_DI(DWORD dwFlags) ;
extern void _dump_EnumObjects_flags(DWORD dwFlags) ; extern void _dump_EnumObjects_flags(DWORD dwFlags) ;
extern void _dump_DIPROPHEADER(DIPROPHEADER *diph) ; extern void _dump_DIPROPHEADER(DIPROPHEADER *diph) ;
extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ; extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ;
extern void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW *ddoi) ;
/* And the stubs */ /* And the stubs */
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat( extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
...@@ -85,8 +97,8 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel( ...@@ -85,8 +97,8 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification( extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
LPDIRECTINPUTDEVICE8A iface,HANDLE hnd ) ; LPDIRECTINPUTDEVICE8A iface,HANDLE hnd ) ;
extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface) ; extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface( extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(LPDIRECTINPUTDEVICE8A iface,REFIID riid,LPVOID *ppobj);
LPDIRECTINPUTDEVICE8A iface,REFIID riid,LPVOID *ppobj ) ; extern HRESULT WINAPI IDirectInputDevice2WImpl_QueryInterface(LPDIRECTINPUTDEVICE8W iface,REFIID riid,LPVOID *ppobj);
extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef( extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
LPDIRECTINPUTDEVICE8A iface) ; LPDIRECTINPUTDEVICE8A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects( extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
...@@ -94,6 +106,11 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects( ...@@ -94,6 +106,11 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
LPVOID lpvRef, LPVOID lpvRef,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2WImpl_EnumObjects(
LPDIRECTINPUTDEVICE8W iface,
LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
LPVOID lpvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid, REFGUID rguid,
...@@ -103,9 +120,16 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo( ...@@ -103,9 +120,16 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
LPDIDEVICEOBJECTINSTANCEA pdidoi, LPDIDEVICEOBJECTINSTANCEA pdidoi,
DWORD dwObj, DWORD dwObj,
DWORD dwHow) ; DWORD dwHow) ;
extern HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
LPDIDEVICEOBJECTINSTANCEW pdidoi,
DWORD dwObj,
DWORD dwHow);
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEINSTANCEA pdidi) ; LPDIDEVICEINSTANCEA pdidi) ;
extern HRESULT WINAPI IDirectInputDevice2WImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE8W iface,
LPDIDEVICEINSTANCEW pdidi) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel( extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
HWND hwndOwner, HWND hwndOwner,
...@@ -126,10 +150,19 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects( ...@@ -126,10 +150,19 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
LPDIENUMEFFECTSCALLBACKA lpCallback, LPDIENUMEFFECTSCALLBACKA lpCallback,
LPVOID lpvRef, LPVOID lpvRef,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2WImpl_EnumEffects(
LPDIRECTINPUTDEVICE8W iface,
LPDIENUMEFFECTSCALLBACKW lpCallback,
LPVOID lpvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIEFFECTINFOA lpdei, LPDIEFFECTINFOA lpdei,
REFGUID rguid) ; REFGUID rguid) ;
extern HRESULT WINAPI IDirectInputDevice2WImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE8W iface,
LPDIEFFECTINFOW lpdei,
REFGUID rguid) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
LPDIRECTINPUTDEVICE8A iface, LPDIRECTINPUTDEVICE8A iface,
LPDWORD pdwOut) ; LPDWORD pdwOut) ;
...@@ -157,20 +190,40 @@ extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDE ...@@ -157,20 +190,40 @@ extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDE
LPDIENUMEFFECTSINFILECALLBACK pec, LPDIENUMEFFECTSINFILECALLBACK pec,
LPVOID pvRef, LPVOID pvRef,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7WImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8W iface,
LPCWSTR lpszFileName,
LPDIENUMEFFECTSINFILECALLBACK pec,
LPVOID pvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface, extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName, LPCSTR lpszFileName,
DWORD dwEntries, DWORD dwEntries,
LPDIFILEEFFECT rgDiFileEft, LPDIFILEEFFECT rgDiFileEft,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7WImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8W iface,
LPCWSTR lpszFileName,
DWORD dwEntries,
LPDIFILEEFFECT rgDiFileEft,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface, extern HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
LPDIACTIONFORMATA lpdiaf, LPDIACTIONFORMATA lpdiaf,
LPCSTR lpszUserName, LPCSTR lpszUserName,
DWORD dwFlags); DWORD dwFlags);
extern HRESULT WINAPI IDirectInputDevice8WImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
LPDIACTIONFORMATW lpdiaf,
LPCWSTR lpszUserName,
DWORD dwFlags);
extern HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface, extern HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
LPDIACTIONFORMATA lpdiaf, LPDIACTIONFORMATA lpdiaf,
LPCSTR lpszUserName, LPCSTR lpszUserName,
DWORD dwFlags); DWORD dwFlags);
extern HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface,
LPDIACTIONFORMATW lpdiaf,
LPCWSTR lpszUserName,
DWORD dwFlags);
extern HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface, extern HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader); LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader);
extern HRESULT WINAPI IDirectInputDevice8WImpl_GetImageInfo(LPDIRECTINPUTDEVICE8W iface,
LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader);
#endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */ #endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */
@ stdcall DirectInputCreateA(long long ptr ptr) @ stdcall DirectInputCreateA(long long ptr ptr)
@ stub DirectInputCreateW @ stdcall DirectInputCreateW(long long ptr ptr)
@ stdcall DirectInputCreateEx(long long ptr ptr ptr) @ stdcall DirectInputCreateEx(long long ptr ptr ptr)
@ stdcall DllCanUnloadNow() DINPUT_DllCanUnloadNow @ stdcall DllCanUnloadNow() DINPUT_DllCanUnloadNow
@ stdcall DllGetClassObject(ptr ptr ptr) DINPUT_DllGetClassObject @ stdcall DllGetClassObject(ptr ptr ptr) DINPUT_DllGetClassObject
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
#include "dinput.h" #include "dinput.h"
/* Implementation specification */ /* Implementation specification */
typedef struct IDirectInputAImpl IDirectInputAImpl; typedef struct IDirectInputImpl IDirectInputImpl;
struct IDirectInputAImpl struct IDirectInputImpl
{ {
LPVOID lpVtbl; LPVOID lpVtbl;
DWORD ref; DWORD ref;
...@@ -38,11 +38,13 @@ struct IDirectInputAImpl ...@@ -38,11 +38,13 @@ struct IDirectInputAImpl
/* Function called by all devices that Wine supports */ /* Function called by all devices that Wine supports */
typedef struct dinput_device { typedef struct dinput_device {
INT pref; INT pref;
BOOL (*enum_device)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, int version); BOOL (*enum_deviceA)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, int version);
HRESULT (*create_device)(IDirectInputAImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev); BOOL (*enum_deviceW)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, int version);
HRESULT (*create_deviceA)(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev);
HRESULT (*create_deviceW)(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev);
} dinput_device; } dinput_device;
extern void dinput_register_device(dinput_device *device) ; extern void dinput_register_device(dinput_device *device);
extern HINSTANCE DINPUT_instance; extern HINSTANCE DINPUT_instance;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment