24#define WIN32_LEAN_AND_MEAN
32 RAWINPUTDEVICE raw_devices[1];
35 raw_devices[0].usUsagePage = 0x01;
36 raw_devices[0].usUsage = 0x05;
38 hwnd =
CreateWindowExA(
WS_EX_TOPMOST,
"static",
"dinput",
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL);
43 ok(
res ==
FALSE,
"RegisterRawInputDevices succeeded\n");
46 raw_devices[0].dwFlags = 0;
47 raw_devices[0].hwndTarget = 0;
51 ok(
res ==
FALSE,
"RegisterRawInputDevices succeeded\n");
56 ok(
res ==
TRUE,
"RegisterRawInputDevices failed\n");
61 raw_devices[0].dwFlags = RIDEV_REMOVE;
62 raw_devices[0].hwndTarget =
hwnd;
66 ok(
res ==
FALSE,
"RegisterRawInputDevices succeeded\n");
69 raw_devices[0].hwndTarget = 0;
73 ok(
res ==
TRUE,
"RegisterRawInputDevices failed\n");
78 raw_devices[0].dwFlags = RIDEV_INPUTSINK;
79 raw_devices[0].hwndTarget = 0;
84 ok(
res ==
FALSE,
"RegisterRawInputDevices failed\n");
88 raw_devices[0].hwndTarget =
hwnd;
92 ok(
res ==
TRUE,
"RegisterRawInputDevices succeeded\n");
#define ERROR_INVALID_PARAMETER
BOOL WINAPI DECLSPEC_HOTPATCH RegisterRawInputDevices(PCRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize)
DWORD WINAPI GetLastError(void)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI DestroyWindow(_In_ HWND)