January 8th, 2005, 06:56 PM
Anyone know, when windows shuts down, does explorer call another program or is it a integrated part of explorer ? I mean what is the program that is actually responsable for shuting the computer down ? like /sbin/shutdown in linux.
The fool doth think he is wise, but the wiseman knows himself to be a fool - Good Ole Bill Shakespeare
January 8th, 2005, 07:03 PM
For options type shutdown -? at the command prompt
When death sleeps it dreams of you...
January 8th, 2005, 11:59 PM
windows is shutdown using API calls
it makes a call to user32.dll and tells it to either shutdown / reboot / logoff etc etc
Public Declare Function ExitWindowsEx Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
im pretty sure shutdown.exe would just have that code in it.
also typing 'rundll user32.dll,ExitWindowsEx' or something similar (cant remember the actual command) will also tell user32.dll to tell the rest of the computer to shutdown.
It would be a kernel thing, not just explorer, explorer would only be responsible for handling programs not closing and to offer the user the Shutdown Menu
Note: I maybe wrong, dont take my word for it
thats how other programmers get windows to shutdown