Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool2.mu.edu!samsung!noose.ecn.purdue.edu!news From: moyman@ecn.purdue.edu Newsgroups: comp.sys.mac.programmer Subject: Shutdown Manager...(somebody!!) Message-ID: <1991Jan14.162542.29247@noose.ecn.purdue.edu> Date: 14 Jan 91 16:25:42 GMT Sender: news@noose.ecn.purdue.edu (USENET news) Reply-To: moyman@ecn.purdue.edu Organization: Engineering Computer Network Lines: 27 Someone out there must have done this before! I have an INIT that installs code to be run at shutdown. The question is how do I get the resources it needs to hand around until then?? Interesting observation: All of the constants (#define's ...their values) from the INIT remain intact while the globals from the INIT are accessable but their values are scrod!! This doesn't make sense to my feeble mind. Lets take the example of an 'STR ' resource named "String #1" (with the "System Heap" bit set...nothing else). I could do: strHdl = GetNamedResource('STR ', "\pString #1"); DetachResource(strHdl); HLock(strHdl); Doing a "GetString" at shutdown finds nothing... The value of strHdl is scrod at shutdown so how can I (or the GetString call) do a "LoadResource" to get it back in memory?? To tell you the truth I am not real sure what I am trying to do... Keep the resource in memory till shutdown or just keep the resource in the system heap till shutdown...or what. Am I the only one who has tried to do this?? or is it just not posible to do!! (which I can't believe) Mike Moya Engineering Computer Network Purdue University