Zebediah Figura : user32/tests: Test opening raw input devices.

Alexandre Julliard julliard at winehq.org
Wed Jul 3 17:11:54 CDT 2019


Module: wine
Branch: master
Commit: 2ed141d6807da1e2e23c71d01aaf7af64af10ce1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2ed141d6807da1e2e23c71d01aaf7af64af10ce1

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Wed Jul  3 11:09:36 2019 -0500

user32/tests: Test opening raw input devices.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/tests/input.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 168b055..d0dc4a8 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -1625,6 +1625,7 @@ static void test_GetRawInputDeviceList(void)
         char nameA[128];
         UINT sz, len;
         RID_DEVICE_INFO info;
+        HANDLE file;
 
         /* get required buffer size */
         name[0] = '\0';
@@ -1664,6 +1665,14 @@ static void test_GetRawInputDeviceList(void)
         ok(ret == sizeof(info), "GetRawInputDeviceInfo gave wrong return: %d\n", err);
         ok(sz == sizeof(info), "GetRawInputDeviceInfo set wrong size\n");
         ok(info.dwType == devices[i].dwType, "GetRawInputDeviceInfo set wrong type: 0x%x\n", info.dwType);
+
+        /* setupapi returns an NT device path, but CreateFile() < Vista can't
+         * understand that; so use the \\?\ prefix instead */
+        name[1] = '\\';
+        file = CreateFileW(name, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
+        todo_wine_if(info.dwType != RIM_TYPEHID)
+            ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u\n", wine_dbgstr_w(name), GetLastError());
+        CloseHandle(file);
     }
 
     /* check if variable changes from larger to smaller value */




More information about the wine-cvs mailing list