    

         ,
      .  ,  
 :   API ExitWindowsEx,  ,    
   .   ,   ,   ,
        ,  
.    ,     ExitWindowsEx   
EWX_FORCE,         " ",  
 .         ,
, WinPopup    ,      ExitWindowsEx 
   -  ,    . 

    :     ExitWindowsEx, 
   ,   ,   . 

   "  "?      
,       .    
       (  , 
 ,  ),     ,   
, ,  ,       " "  
 TerminateProcess. 

,  :       ,  
 WM_CLOSE.   ,    . 

 :        WM_CLOSE.
         .    
 -:   ,    , 
  ,     .    . 

 :     (       
 , ,   ,     , , 
   ,        )
   . 

 :        
     WM_QUERYENDSESSION.    ,  
   ,     .    
  WM_ENDSESSION.     . . 

 :    . . 

 :      API TerminateProcess.
  !     ,      
  ,       ,  
TerminateProcess      .   . 

 :  , ,    ExitWimdowsEx. 

    ,    , 
   ExitWimdowsEx.  ,    
    ,      
 . 

   ,       : ,
  Internet Explorer        .  
      WinPopup.      
  . 

 Windows NT/2000       . -,
ExitWindowsEx       ,     
    (    Administrators  Server
Operators),   :      "SeShutdownPrivilege".  
 - .      Knowledge Base. -,    
 ,  ,   ,    
.         Task Scheduler,   "
"   ,     . ,  Windows
NT/2000   InitiateSystemShutdown,    
 . 

. :

Microsoft Knowledge Base Q161136, Q168796.
 
 2000  
http://smsoft.chat.ru/ru
smsoft@chat.ru
