Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput8/tests/hid.c | 2 -- dlls/ntoskrnl.exe/pnp.c | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 431dadcb348..03c3ac20905 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -10012,14 +10012,12 @@ static LRESULT CALLBACK devnotify_wndproc( HWND hwnd, UINT msg, WPARAM wparam, L debugstr_guid( &iface->dbcc_classguid ) ); ok( iface->dbcc_size >= offsetof( DEV_BROADCAST_DEVICEINTERFACE_W, dbcc_name[wcslen( iface->dbcc_name ) + 1] ), "got dbcc_size %u\n", iface->dbcc_size ); - todo_wine ok( !wcsncmp( iface->dbcc_name, expect_prefix, wcslen( expect_prefix ) ), "got dbcc_name %s\n", debugstr_w(iface->dbcc_name) );
upper_end = wcschr( iface->dbcc_name + wcslen( expect_prefix ), '#' ); name_end = iface->dbcc_name + wcslen( iface->dbcc_name ) + 1; ok( !!upper_end, "got dbcc_name %s\n", debugstr_w(iface->dbcc_name) ); - todo_wine ok( all_upper( iface->dbcc_name, upper_end ), "got dbcc_name %s\n", debugstr_w(iface->dbcc_name) ); ok( all_lower( upper_end, name_end ), "got dbcc_name %s\n", debugstr_w(iface->dbcc_name) );
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 6d53d79267e..3aa2db46ff0 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -698,11 +698,11 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
size_t namelen = name->Length / sizeof(WCHAR); DEV_BROADCAST_DEVICEINTERFACE_W *broadcast; + WCHAR *path, *refstr, *p, *upper_end; struct device_interface *iface; HANDLE iface_key, control_key; OBJECT_ATTRIBUTES attr = {0}; struct wine_rb_entry *entry; - WCHAR *path, *refstr, *p; UNICODE_STRING string; DWORD data = enable; NTSTATUS ret; @@ -788,6 +788,12 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable broadcast->dbcc_classguid = iface->interface_class; lstrcpynW( broadcast->dbcc_name, name->Buffer, namelen + 1 ); if (namelen > 1) broadcast->dbcc_name[1] = '\'; + + upper_end = wcschr( broadcast->dbcc_name, '#' ); + if (upper_end) upper_end = wcschr( upper_end + 1, '#' ); + while (upper_end && upper_end-- != broadcast->dbcc_name) + *upper_end = towupper( *upper_end ); + send_devicechange( enable ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE, broadcast, len ); heap_free( broadcast ); }