Fix ExitWindows()

Francois Gouget fgouget at codeweavers.com
Fri Feb 24 08:41:15 CST 2006


Robert Shearman wrote:
> Francois Gouget wrote:
> 
>>
>> -                if (SendMessageTimeoutW( *phwnd, WM_QUERYENDSESSION, 
>> 0, 0, send_flags, INFINITE, &result) && !result) break;
>> +                if (SendMessageTimeoutW( *phwnd, WM_QUERYENDSESSION, 
>> 0, 0, send_flags, 0, &result))
>>  
>>
> 
> Was this change deliberate to remove the check of result? If so, I don't 
> see where else the result of the message can be properly checked.

The result is sent back to the application in the WM_ENDSESSION message 
and checked in the if branch to exit the loop, and then again right 
outside the loop to abort the Windows shutdown.

                 if (SendMessageTimeoutW( *phwnd, WM_QUERYENDSESSION, 0, 
0, send_flags, 0, &result))
                 {
                     DWORD_PTR dummy;
                     SendMessageTimeoutW( *phwnd, WM_ENDSESSION, result, 
0, send_flags, 0, &dummy );
                     if (!result) break;
                 }
             }
             HeapFree( GetProcessHeap(), 0, list );

             if (!result)
                 return TRUE;



-- 
Francois Gouget
fgouget at codeweavers.com




More information about the wine-devel mailing list