Important: The information in this document is obsolete and should not be used for new development.
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 ShutDwnRemoveTrap Macros Requiring Routine Selectors
_Shutdown
Selector Routine $0001 ShutDwnPower $0002 ShutDwnStart $0003 ShutDwnInstall $0004 ShutDwnRemove