Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!applelink.apple.com!MAC.ROMOS From: MAC.ROMOS@applelink.apple.com (Ian Hendry) Newsgroups: comp.sys.mac.programmer Subject: Re: INIT's in LSC Message-ID: <1292@internal.Apple.COM> Date: 11 Apr 89 17:40:31 GMT Sender: usenet@Apple.COM Distribution: comp.sys.mac.programmer Organization: Yeah, I'm organized. Lines: 26 References:<1474@ccnysci.UUCP> <11046@paris.ics.uci.edu> >Inside Mac says that when INIT 31 calls an INIT file, it places a handle >to the INIT resource in A0 before the call. So all I have to do is call >DetachResource on it and the INIT resource will stay in memory, then I >just make sure to setup A4 correctly and the thing should work. Nope. >I think I have a pretty good grasp of what is going on and what needs >to be done but I guess I am overlooking something. I am pretty sure that INIT 31 has its own heap into which the inits are loaded. Detaching your resource leaves it in a heap that is dumped after the INIT31 process is finished. You need to have you code in the system heap to stay around. Try setting the system heap flag. Hope it helps.... Ian Hendry MAC.ROMOS@applelink.apple.com Make sure my name is in the subject of any Email, or post replies to network. TE: 408-974-4737 Disclaimer: It was all HIS idea anyway! Nothing I say reflects anything my employer means... or anything I mean for that matter.