Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!think!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.ira.uka.de Newsgroups: comp.sys.mac.programmer Subject: Re: GetResource failure during ShutDown procedure Keywords: ShutDown, GetResource Message-ID: <1348@smurf.ira.uka.de> Date: 30 Dec 89 13:43:56 GMT References: <5817@sdcc6.ucsd.edu> Reply-To: urlichs@smurf.ira.uka.de (Matthias Urlichs) Organization: University of Karlsruhe, FRG Lines: 21 In comp.sys.mac.programmer ma199at@sdcc6.ucsd.edu (L J Cris) writes: < Is there something special to loading resources during a shutdown proc? < I was trying to load a 'snd ' resource during a routine installed by < ShutDwnInstall and I always got a ResErr of -204, resProblem. < Your problem is that you installed your shutdown proc with sdOnRestart/sdOnShutdown. At that point, all volumes are unmounted and there isn't any hard disk you can get your resource from. < Is there a way to get around this? < Use a procedure installed w/ sdOnUnmount to read the resource, store its handle somewhere convenient, then use that later. General Hint #1243: If you want to put up a dialog box allowing to _cancel_ the shutdown, you'll have to patch _Shutdown. (Jump to the original code to continue, return to abort.) Calling _ExitToShell from within the shutdown procedure (the way TOPS does) crashes your Mac. -- Matthias Urlichs