NIF_GUID binds the tray icon to the EXE's full path. Once a GUID is registered for one path, Shell_NotifyIcon(NIM_ADD) silently fails for any other path using the same GUID. This caused Debug-vs-Release builds and service+agent dual-process scenarios to fight over the same GUID slot. Drop NIF_GUID and the static NOTIFY_ICON_GUID; revert to the traditional (hWnd, uID) identification. The icon is freshly registered per process launch, no path binding, no cross-instance interference. The NIF_GUID was leftover from the AUMID/Toast experiment that was later reverted; only the tray-icon side of that change wasn't cleaned up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
374 KiB
374 KiB