I found, that there is difference on handling the Shell_NotifyIcon failure. Unfortunately, _ANY_ failure is reported as ERROR_TIMEOUT, so if you use this error state to repeat request after a while, your program will be trapped into the infinite loop.
I don't know, why this has been changed, but I cannot find any logic in this modification. You should no longer check GetLastError for the state ERROR_TIMEOUT in the Windows Seven.
76BE73B2 lea eax,[ebp-1640h]
76BE73B8 push eax
76BE73B9 push dword ptr [esi+4]
76BE73BC mov dword ptr [ebp-1618h],34753423h
76BE73C6 push 4Ah ;WM_COPYDATA
76BE73C8 push dword ptr [ebp-1650h]
76BE73CE mov dword ptr [ebp-161Ch],edi
76BE73D4 mov dword ptr [ebp-1640h],1
76BE73DE mov dword ptr [ebp-163Ch],5CCh
76BE73E8 call dword ptr [__imp__SendMessageTimeoutW@28 (76B81CB4h)] ; sending WM_COPYDATA
76BE73EE mov ebx,eax
76BE73F0 neg ebx
76BE73F2 sbb ebx,ebx
76BE73F4 and ebx,dword ptr [ebp-161Ch]
76BE73FA test byte ptr [esi+0Ch],10h
76BE73FE jne _Shell_NotifyIconW@8+3B4h (76BAE341h)
76BE7404 cmp ebx,edi ;edi = 0, ebx = return code
76BE7406 je _Shell_NotifyIconW@8+3F2h (76BE7457h) ;error, jump below line
........
-------------------------------------------------------------------
76BE7457 call dword ptr [__imp__GetLastError@0 (76B81128h)] ; read last error
76BE745D test eax,eax ; is zero?
76BE745F jne 76BE7408 ; no, this is OK
76BE7461 push 5B4h ; ERROR_TIMEOUT (why?)
76BE7466 call dword ptr [__imp__SetLastError@4 (76B81114h)] ; set last error
76BE746C jmp 76BE7408 ; now it is ok, go back