This may fail for multiple legitimate reasons. Most commonly, the device may not actually be present on the machine (it will appear in the registry regardless). Less commonly, the device may have been removed between the call to NtEnumerateKey and here.
We can get around the former by checking the Linked subkey value, but there is not much point; failing to open the file gives us just as much information.
From: Zebediah Figura zfigura@codeweavers.com
This may fail for multiple legitimate reasons. Most commonly, the device may not actually be present on the machine (it will appear in the registry regardless). Less commonly, the device may have been removed between the call to NtEnumerateKey and here.
We can get around the former by checking the Linked subkey value, but there is not much point; failing to open the file gives us just as much information.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53300 --- dlls/win32u/rawinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/rawinput.c b/dlls/win32u/rawinput.c index 2f48e4f8c43..ab1252ccea6 100644 --- a/dlls/win32u/rawinput.c +++ b/dlls/win32u/rawinput.c @@ -249,7 +249,7 @@ static struct device *add_device( HKEY key, DWORD type ) if ((status = NtOpenFile( &file, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT ))) { - ERR( "Failed to open device file %s, status %#x.\n", debugstr_w(path), status ); + WARN( "Failed to open device file %s, status %#x.\n", debugstr_w(path), status ); return NULL; }
This merge request was approved by Rémi Bernon.