Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Processes
Chapter 8 - Shutdown Manager


Summary of the Shutdown Manager

Pascal Summary

Constants

CONST
   {masks for ShutDwnInstall flags}
   sdOnPowerOff      = 1;  {call procedure before power off}
   sdOnRestart       = 2;  {call procedure before restart}
   sdRestartOrPower  = 3;  {call procedure before power off or restart}
   sdOnUnmount       = 4;  {call procedure before unmounting volumes}
   sdOnDrivers       = 8;  {call procedure before checking for open drivers}

Shutdown Manager Routines

Shutting Down or Restarting the Computer

PROCEDURE ShutDwnPower;
PROCEDURE ShutDwnStart;

Installing or Removing a Shutdown Procedure

PROCEDURE ShutDwnInstall(shutDownProc: ProcPtr; flags: Integer);
PROCEDURE ShutDwnRemove(shutDownProc: ProcPtr);

Application-Defined Routine

Shutdown Procedures

PROCEDURE MyShutDownProc;

C Summary

Constants

/*masks for ShutDwnInstall flags*/
enum {
   sdOnPowerOff      = 1,  /*call procedure before power off*/
   sdOnRestart       = 2,  /*call procedure before restart*/
   sdRestartOrPower  = 3,  /*call procedure before power off or restart*/
   sdOnUnmount       = 4,  /*call procedure before unmounting volumes*/
   sdOnDrivers       = 8   /*call procedure before checking for open */
};                         /* drivers*/

Data Types

typedef pascal void (*ShutDwnProcPtr)(void)

Shutdown Manager Routines

Shutting Down or Restarting the Computer

pascal void ShutDwnPower(void);
pascal void ShutDwnStart(void);

Installing or Removing a Shutdown Procedure

pascal void ShutDwnInstall(ShutDwnProcPtr shutDownProc, short flags);
pascal void ShutDwnRemove(ShutDwnProcPtr shutDownProc);

Application-Defined Routine

Shutdown Procedures

pascal void MyShutDownProc(void);

Assembly-Language Summary

Constants

sdPowerOff        EQU      1        ;selector for ShutDwnPower
sdRestart         EQU      2        ;selector for ShutDwnStart
sdInstall         EQU      3        ;selector for ShutDwnInstall
sdRemove          EQU      4        ;selector for ShutDwnRemove

Trap Macros Requiring Routine Selectors

_Shutdown
SelectorRoutine
$0001ShutDwnPower
$0002ShutDwnStart
$0003ShutDwnInstall
$0004ShutDwnRemove


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996