dear all, how can i detect a system restart using WM_QUERRYSESSION. i'm able to differentiate between a Logoff and shutdown using the message, but no clue whatsoever of differentiating between a system shutdown and system restart. plz. respond regards