Important: The information in this document is obsolete and should not be used for new development.
Closing Open Applications
When a user or application notifies the Finder to shut down or restart the computer, the Finder calls the Process Manager. The Process Manager performs the important task of notifying all open applications to quit. It checks its list of open applications and sends a Quit Application event to those applications that can process Apple events. For applications that cannot process Apple events, the Process Manager sends a mouse-down event indicating that Quit was chosen from the File menu. This technique works for applications that display Quit in the File menu. Applications that display Quit in a different menu or that display a different form of Quit (such as Quit Document or Quit...) must specify a resource of type'mstr'
or'mst#'
with a resource ID of 100 or 101, respectively. The Process Manager reads these resources to locate the menu containing the Quit item or to find the exact Quit string to send to the application.Once notified, open applications have the opportunity to save data and execute other exit procedures before they quit. Note that
ShutDwnPower
andShutDwnStart
do not notify open applications to quit. For this reason, you should not call these routines directly.