View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003747 | JEDI VCL | 00 JVCL Components | public | 2006-06-06 10:44 | 2006-06-09 05:57 |
Reporter | ykami | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003747: JvTrayIcon - Problem when Shell_NotifyIcon(NIM_DELETE) does timeout. | ||||
Description | Calling Shell_NotifyIcon can fail on XP when the shell is busy. However, even when GetLastError() returns ERROR_TIMEOUT, the icon can often be actually added(or deleted). In the timeout of NIM_ADD, it can be confirmed that Shell_NotifyIcon(NIM_MODIFY) returns true and the addition of the icon has succeeded. To similar, In the timeout of NIM_DELETE, it can be confirmed that Shell_NotifyIcon(NIM_MODIFY) returns false and the deletion of the icon has succeeded. It fails even if NIM_DELETE is retried when the deletion of the icon has succeeded when NIM_DELETE does the time-out. Therefore, the response doesn't return for 30 seconds. And, even if the Active property is changed after that, the icon cannot be added. JvTrayIcon.pas Rev:10644 | ||||
Additional Information | Workarounds :function TJvTrayIcon.NotifyIcon --------------------- ErrorCode := GetLastError; if (ErrorCode = 0) or (ErrorCode = ERROR_TIMEOUT) then begin RetryCount := 0; repeat Sleep(cDelay); case dwMessage of NIM_ADD: Result := Shell_NotifyIcon(NIM_MODIFY, @FIconData); NIM_DELETE: Result := not Shell_NotifyIcon(NIM_MODIFY, @FIconData); end; if Result then Exit; Inc(RetryCount); Result := Shell_NotifyIcon(dwMessage, @FIconData); until Result or (RetryCount > cMaxRetryCount); end; end; end; | ||||
Tags | No tags attached. | ||||
|
Okay, thanks, now I finally understand the text from http://support.microsoft.com/default.aspx?scid=kb;ja;418138 |
|
Working fine with rev. 10646. Thanks. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-06-06 10:44 | ykami | New Issue | |
2006-06-06 12:53 | remkobonte | Note Added: 0009393 | |
2006-06-06 12:54 | remkobonte | Note Edited: 0009393 | |
2006-06-07 09:38 | ykami | Note Added: 0009410 | |
2006-06-09 05:57 | obones | Status | new => resolved |
2006-06-09 05:57 | obones | Resolution | open => fixed |
2006-06-09 05:57 | obones | Assigned To | => obones |