From ec0a300f2b71e117ecfcabce6847093bdcbaddba Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 18 Dec 2023 11:16:45 +0100 Subject: [PATCH] [UMPNPMGR] Broadcast a WM_DEVICECHANGE message after a device install was queued --- base/services/umpnpmgr/event.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/base/services/umpnpmgr/event.c b/base/services/umpnpmgr/event.c index 5340431c005..7f104128f7e 100644 --- a/base/services/umpnpmgr/event.c +++ b/base/services/umpnpmgr/event.c @@ -136,6 +136,7 @@ ProcessDeviceInstallEvent( DeviceInstallParams* Params; DWORD len; DWORD DeviceIdLength; +// DWORD dwRecipient; DPRINT("ProcessDeviceInstallEvent(%p)\n", PnpEvent); DPRINT("Device enumerated: %S\n", PnpEvent->InstallDevice.DeviceId); @@ -156,6 +157,14 @@ ProcessDeviceInstallEvent( ReleaseMutex(hDeviceInstallListMutex); SetEvent(hDeviceInstallListNotEmpty); + +// dwRecipient = BSM_ALLDESKTOPS | BSM_APPLICATIONS; +// BroadcastSystemMessageW(BSF_POSTMESSAGE, +// &dwRecipient, +// WM_DEVICECHANGE, +// DBT_DEVNODES_CHANGED, +// 0); + SendMessageW(HWND_BROADCAST, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0); } } }