[UMPNPMGR] Broadcast a WM_DEVICECHANGE message after a device install was queued

This commit is contained in:
Eric Kohl 2023-12-18 11:16:45 +01:00
parent 8f8db4ddb6
commit ec0a300f2b

View file

@ -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);
}
}
}