mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[Shell32]
- Use a timeout to send WM_COPYDATA. - Recall reading, while being sent to a thread that is hung indefinitely or blocked, it will not return properly. This seems to be the case for CORE-8779. Play it safe and use a timeout. svn path=/trunk/; revision=65589
This commit is contained in:
@@ -50,8 +50,8 @@ static BOOL SHELL_NotifyIcon(DWORD dwMessage, void* pnid, HWND nid_hwnd, DWORD n
|
||||
data.lpData = pnotify_data;
|
||||
|
||||
for(hwnd = 0; (hwnd = FindWindowExW(0, hwnd, L"Shell_TrayWnd", NULL)); )
|
||||
if ((unicode ? SendMessageW : SendMessageA)(hwnd, WM_COPYDATA, (WPARAM)nid_hwnd, (LPARAM)&data))
|
||||
ret = TRUE;
|
||||
if ((unicode ? SendMessageTimeoutW : SendMessageTimeoutA)(hwnd, WM_COPYDATA, (WPARAM)nid_hwnd, (LPARAM)&data, SMTO_BLOCK|SMTO_ABORTIFHUNG, 4000, (PDWORD_PTR)&ret))
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user