DirectUpdate 4.7.6 fails to register notification icon at login

Asks questions about settings, bugs...

Moderators: willynt, DiskDrive, fifinou

KAZUNA
Posts: 1
Joined: Thu Apr 21, 2016 12:49 am

DirectUpdate 4.7.6 fails to register notification icon at login

Postby KAZUNA » Thu Apr 21, 2016 1:05 am

This happens only when there are many notification icons (10+) at login time.

I enable "Launch DirectUpdate control/engine at startup" but it doesn't fix the problem.
I see DUControl.exe running.
If I terminate DUControl.exe and relaunch it manually, the notification icon shows up.

This is because DUControl is failing to register the icon but not retrying it.
If there are many notification icons being registered at login, the API often returns an error.
The application is supposed to retry until success.

I have an experience writing an application for notification icon and I had to workaround the problem like this.

Code: Select all

    INT retry = 0;
    INT timeout = 0;

    while (!Shell_NotifyIcon(NIM_ADD, nid))
    {
        retry++;

        if (GetLastError() == ERROR_TIMEOUT)
        {
            timeout++;
        }

        Sleep(4000);

        if (Shell_NotifyIcon(NIM_MODIFY, nid))
        {
            break;
        }
    }

willynt
Site Admin
Posts: 242
Joined: Thu Mar 10, 2005 6:32 am

Re: DirectUpdate 4.7.6 fails to register notification icon at login

Postby willynt » Thu Apr 21, 2016 7:09 am

Hi Kazuna,

Thx very much for your report!
I'll implement similar code in the next version!

Regards
William


Return to “Questions, bugs,...”

Who is online

Users browsing this forum: No registered users and 3 guests