[STDOBJECT] Show the hotplug icon when a USB-Stick is inserted

- Enable the hotplug service by default
- Start a timer on WM_DEVICECHANGE:DBT_DEVNODES_CHANGED to trigger the removable device detection.
This commit is contained in:
Eric Kohl 2020-03-21 23:46:24 +01:00
parent 93e72ed3d6
commit fc999e18af
3 changed files with 38 additions and 14 deletions

View file

@ -27,8 +27,8 @@ VOID CSysTray::GetServicesEnabled()
HKEY hKey;
DWORD dwSize;
/* Enable power and volume by default */
this->dwServicesEnabled = POWER_SERVICE_FLAG | VOLUME_SERVICE_FLAG;
/* Enable power, volume and hotplug by default */
this->dwServicesEnabled = POWER_SERVICE_FLAG | VOLUME_SERVICE_FLAG | HOTPLUG_SERVICE_FLAG;
if (RegCreateKeyExW(HKEY_CURRENT_USER,
L"Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\SysTray",