mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 00:13:57 +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:
parent
f9e8e07d32
commit
a4c82de831
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue