30{
32 RAWINPUTDEVICE raw_devices[1];
34
35 raw_devices[0].usUsagePage = 0x01;
36 raw_devices[0].usUsage = 0x05;
37
38 hwnd =
CreateWindowExA(
WS_EX_TOPMOST,
"static",
"dinput",
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL);
40
41
43 ok(
res ==
FALSE,
"RegisterRawInputDevices succeeded\n");
44
45
46 raw_devices[0].dwFlags = 0;
47 raw_devices[0].hwndTarget = 0;
48
51 ok(
res ==
FALSE,
"RegisterRawInputDevices succeeded\n");
53
56 ok(
res ==
TRUE,
"RegisterRawInputDevices failed\n");
58
59
60
61 raw_devices[0].dwFlags = RIDEV_REMOVE;
62 raw_devices[0].hwndTarget =
hwnd;
63
66 ok(
res ==
FALSE,
"RegisterRawInputDevices succeeded\n");
68
69 raw_devices[0].hwndTarget = 0;
70
73 ok(
res ==
TRUE,
"RegisterRawInputDevices failed\n");
75
76
77
78 raw_devices[0].dwFlags = RIDEV_INPUTSINK;
79 raw_devices[0].hwndTarget = 0;
80
84 ok(
res ==
FALSE,
"RegisterRawInputDevices failed\n");
87
88 raw_devices[0].hwndTarget =
hwnd;
89
92 ok(
res ==
TRUE,
"RegisterRawInputDevices succeeded\n");
94
96}
#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)