WM_QUERYENDSESSION message

Hi there,
??????? I would like to know if there is some method by which it can be
found out whether Windows wants to 'Restart', 'Reboot', or 'Shut down'
when my program receives the WM_QUERYENDSESSION message. I found that
the WPARAM, LPARAM, and their 'low's and 'high's received are the same
for all the three events.
??????? Vimal Aravindashan.