原文地址:Shell_NotifyIconA function (shellapi.h) - Win32 apps | Microsoft Learn
Shell_NotifyIcon will often fail when called during Windows startup (for instance, if your application is listed in HKLM\Software\Microsoft\Windows\CurrentVersion\Run. This appears to be because the system is busy starting applications. The failure is more common on low-spec computers or computers with some brands of antivirus software installed, which seem to be very intensive at startup.
Unfortunately, you cannot rely on the error code returned by GetLastError. When Shell_NotifyIcon returns false, some
在Windows启动期间,如应用程序在HKLM\Software\Microsoft\Windows\CurrentVersion\Run中列出,Shell_NotifyIcon调用可能失败。这可能是由于系统忙于启动应用程序,尤其是在低配置计算机或安装某些品牌防病毒软件的计算机上更常见。错误代码不可靠,常见的GetLastError返回错误包括ERROR_FILE_NOT_FOUND、ERROR_TIMEOUT和ERROR_SUCCESS。失败时最适当的响应是等待一段时间后重试。
订阅专栏 解锁全文
751

被折叠的 条评论
为什么被折叠?



