Important: The information in this document is obsolete and should not be used for new development.
ShutDwnPower
The system software calls theShutDwnPowerprocedure to shut down a Macintosh computer.
PROCEDURE ShutDwnPower;DESCRIPTION
TheShutDwnPowerprocedure initiates the final stage of the system shutdown process. It performs system housekeeping, executes any custom shutdown procedures installed by calls toShutDwnInstall, and, if possible, turns the computer off. (The Shutdown Manager displays the Shutdown alert box if the user has to turn the computer off manually.) The system housekeeping functions consist of a five-step process, described in full in "The Shutdown Process" on page 8-4.You should always call
ShutDwnPowerindirectly, through the Finder, to give any other applications running at the time a chance to exit gracefully. "Sending a Shutdown or Restart Event" on page 8-7 describes the correct way to shut down a Macintosh computer.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theShutDwnPowerprocedure are
Trap macro Selector _Shutdown $0001