19#define DIRECTINPUT_VERSION 0x0700
68 } create_device_tests[] =
85 } enum_devices_tests[] =
100 IDirectInputDeviceA *pDID;
105 skip(
"Failed to instantiate a IDirectInputA instance: 0x%08x\n",
hr);
111 if (create_device_tests[
i].pdev) pDID = (
void *)0xdeadbeef;
113 create_device_tests[
i].pdev ? &pDID :
NULL,
115 ok(
hr == create_device_tests[
i].expected_hr,
"[%d] IDirectInput_CreateDevice returned 0x%08x\n",
i,
hr);
116 if (create_device_tests[
i].pdev)
117 ok(pDID ==
NULL,
"[%d] Output interface pointer is %p\n",
i, pDID);
123 enum_devices_tests[
i].lpCallback,
127 ok(
hr == enum_devices_tests[
i].expected_hr,
"[%d] IDirectInput_EnumDevice returned 0x%08x\n",
i,
hr);
131 ok(
hr ==
E_POINTER,
"IDirectInput_GetDeviceStatus returned 0x%08x\n",
hr);
146 ok(
hr ==
E_HANDLE,
"IDirectInput_RunControlPanel returned 0x%08x\n",
hr);
149 ok(
hr ==
E_HANDLE,
"IDirectInput_RunControlPanel returned 0x%08x\n",
hr);
164 } invalid_param_list[] =
200 &IID_IDirectInput8W, &IID_IDirectInputDeviceA,
201 &IID_IDirectInputDeviceW, &IID_IDirectInputDevice2A,
202 &IID_IDirectInputDevice2W, &IID_IDirectInputDevice7A,
203 &IID_IDirectInputDevice7W, &IID_IDirectInputDevice8A,
204 &IID_IDirectInputDevice8W, &IID_IDirectInputEffect};
206 static REFIID iid_list[] = {&IID_IDirectInputA, &IID_IDirectInputW,
207 &IID_IDirectInput2A, &IID_IDirectInput2W,
208 &IID_IDirectInput7A, &IID_IDirectInput7W};
214 if (!pDirectInputCreateEx)
216 win_skip(
"DirectInputCreateEx is not available\n");
222 if (invalid_param_list[
i].ppdi)
pUnk = (
void *)0xdeadbeef;
225 invalid_param_list[
i].
riid,
226 invalid_param_list[
i].ppdi ? (
void **)&
pUnk :
NULL,
228 ok(
hr == invalid_param_list[
i].expected_hr,
"[%d] DirectInputCreateEx returned 0x%08x\n",
i,
hr);
229 if (invalid_param_list[
i].ppdi)
230 ok(
pUnk == invalid_param_list[
i].expected_ppdi,
"[%d] Output interface pointer is %p\n",
i,
pUnk);
235 pUnk = (
void *)0xdeadbeef;
238 ok(
pUnk == (
void *)0xdeadbeef,
"[%d] Output interface pointer is %p\n",
i,
pUnk);
245 ok(
hr ==
DI_OK,
"[%d] DirectInputCreateEx returned 0x%08x\n",
i,
hr);
246 ok(
pUnk !=
NULL,
"[%d] Output interface pointer is NULL\n",
i);
248 IUnknown_Release(
pUnk);
258 ok(
hr ==
DI_OK,
"[%d/%d] DirectInputCreateEx returned 0x%08x\n",
i,
j,
hr);
259 ok(
pUnk !=
NULL,
"[%d] Output interface pointer is NULL\n",
i);
261 IUnknown_Release(
pUnk);
269 &IID_IDirectInput2A, &IID_IDirectInput2W,
270 &IID_IDirectInput7A, &IID_IDirectInput7W};
272 static REFIID no_interface_list[] =
276 &IID_IDirectInputDeviceA,
277 &IID_IDirectInputDeviceW,
278 &IID_IDirectInputDevice2A,
279 &IID_IDirectInputDevice2W,
280 &IID_IDirectInputDevice7A,
281 &IID_IDirectInputDevice7W,
282 &IID_IDirectInputDevice8A,
283 &IID_IDirectInputDevice8W,
284 &IID_IDirectInputEffect,
295 win_skip(
"Failed to instantiate a IDirectInputA instance: 0x%08x\n",
hr);
300 ok(
hr ==
E_POINTER,
"IDirectInput_QueryInterface returned 0x%08x\n",
hr);
302 pUnk = (
void *)0xdeadbeef;
304 ok(
hr ==
E_POINTER,
"IDirectInput_QueryInterface returned 0x%08x\n",
hr);
305 ok(
pUnk == (
void *)0xdeadbeef,
"Output interface pointer is %p\n",
pUnk);
308 ok(
hr ==
E_POINTER,
"IDirectInput_QueryInterface returned 0x%08x\n",
hr);
314 ok(
hr ==
S_OK,
"[%d] IDirectInput_QueryInterface returned 0x%08x\n",
i,
hr);
315 ok(
pUnk !=
NULL,
"[%d] Output interface pointer is NULL\n",
i);
321 pUnk = (
void *)0xdeadbeef;
334 IDirectInputDeviceA *pDID;
339 win_skip(
"Failed to instantiate a IDirectInputA instance: 0x%08x\n",
hr);
344 ok(
hr ==
E_POINTER,
"IDirectInput_CreateDevice returned 0x%08x\n",
hr);
346 pDID = (
void *)0xdeadbeef;
348 ok(
hr ==
E_POINTER,
"IDirectInput_CreateDevice returned 0x%08x\n",
hr);
349 ok(pDID ==
NULL,
"Output interface pointer is %p\n", pDID);
352 ok(
hr ==
E_POINTER,
"IDirectInput_CreateDevice returned 0x%08x\n",
hr);
354 pDID = (
void *)0xdeadbeef;
357 ok(pDID ==
NULL,
"Output interface pointer is %p\n", pDID);
360 ok(
hr ==
E_POINTER,
"IDirectInput_CreateDevice returned 0x%08x\n",
hr);
363 ok(
hr ==
DI_OK,
"IDirectInput_CreateDevice returned 0x%08x\n",
hr);
384 "%s guidInstance (%s) does not match guidProduct (%s)\n",
391 "Keyboard guidProduct (%s) does not match GUID_SysKeyboard (%s)\n",
396 "Mouse guidProduct (%s) does not match GUID_SysMouse (%s)\n",
401 static const GUID pidvid_product_guid = {
402 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44}
405 ok(
instance->guidProduct.Data2 == pidvid_product_guid.Data2,
406 "guidProduct.Data2 is %04x\n",
instance->guidProduct.Data2);
407 ok(
instance->guidProduct.Data3 == pidvid_product_guid.Data3,
408 "guidProduct.Data3 is %04x\n",
instance->guidProduct.Data3);
409 ok(!
memcmp(
instance->guidProduct.Data4, pidvid_product_guid.Data4,
sizeof(pidvid_product_guid.Data4)),
426 win_skip(
"Failed to instantiate a IDirectInputA instance: 0x%08x\n",
hr);
458 ok(
hr ==
DI_OK,
"IDirectInput_EnumDevices returned 0x%08x\n",
hr);
465 ok(
hr ==
DI_OK,
"IDirectInput_EnumDevices returned 0x%08x\n",
hr);
472 ok(
hr ==
DI_OK,
"IDirectInput_EnumDevices returned 0x%08x\n",
hr);
486 win_skip(
"Failed to instantiate a IDirectInputA instance: 0x%08x\n",
hr);
491 ok(
hr ==
E_POINTER,
"IDirectInput_GetDeviceStatus returned 0x%08x\n",
hr);
498 ok(
hr ==
DI_OK,
"IDirectInput_GetDeviceStatus returned 0x%08x\n",
hr);
512 win_skip(
"Failed to instantiate a IDirectInputA instance: 0x%08x\n",
hr);
536 ok(
hr ==
DI_OK,
"IDirectInput_Initialize returned 0x%08x\n",
hr);
554 win_skip(
"Failed to instantiate a IDirectInputA instance: 0x%08x\n",
hr);
561 ok(
hr ==
S_OK,
"IDirectInput_RunControlPanel returned 0x%08x\n",
hr);
564 ok(
hr ==
S_OK,
"IDirectInput_RunControlPanel returned 0x%08x\n",
hr);
571 ok(
hr ==
E_HANDLE,
"IDirectInput_RunControlPanel returned 0x%08x\n",
hr);
574 ok(
hr ==
E_HANDLE,
"IDirectInput_RunControlPanel returned 0x%08x\n",
hr);
582 IDirectInputDeviceA *pDID;
583 IDirectInputJoyConfig8 *pDIJC;
591 win_skip(
"Failed to instantiate a IDirectInputA instance: 0x%08x\n",
hr);
598 win_skip(
"Failed to instantiate a IDirectInputJoyConfig8 instance: 0x%08x\n",
hr);
612 "IDirectInputJoyConfig8_GetConfig returned 0x%08x\n",
hr);
617 ok (
SUCCEEDED(
hr),
"IDirectInput_CreateDevice failed with guid from GetConfig hr = 0x%08x\n",
hr);
632 pDirectInputCreateEx = (
void *)
GetProcAddress(dinput_mod,
"DirectInputCreateEx");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
HRESULT WINAPI DECLSPEC_HOTPATCH DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter)
static HINSTANCE instance
#define GetProcAddress(x, y)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define todo_wine_if(is_todo)
#define IsEqualGUID(rguid1, rguid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
unsigned int device_count
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
HWND WINAPI GetDesktopWindow(void)