Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!apple!han From: han@Apple.COM (Byron Han) Newsgroups: comp.sys.mac.programmer Subject: Re: Help Me Call Code Resources From My DA... Message-ID: <35156@apple.Apple.COM> Date: 1 Oct 89 15:08:47 GMT References: <50798@tiger.oxy.edu> Organization: Apple R&D - Networking & Communications Lines: 21 In article <50798@tiger.oxy.edu> sonenbli@oxy.edu (Andrew D. Sonenblick) writes: > I am writing a DA which opens ResFiles in the System Folder, > loads standalone code from each one--and for now LOCKS the > Handles to the code resources--(of course then closing the > ResFiles). Did you detach the resource handles? If not, then the resources go away when you close the resource file that the resource comes from. > During this I store the Handles in an array of > Handles. The DA then calls each resource with a init > message (same as CDEV, etc.) They all execute and return > properly. (Note that all of this occurs in the "case Open" > in my DA) > > Then, however, during the "caseControl" when I call the > (locked) resources with the same parameters, same Handles, etc > Macsbug kicks in with an ILGL err. At this point, your handles may be pointing to garbage if you did not explicitly detach the code resources.