Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!execu!sequoia!natinst!davoli From: davoli@natinst.com (Russell Davoli) Newsgroups: comp.sys.mac.programmer Subject: Re: init.driver.resource question Message-ID: <17426@natinst.natinst.com> Date: 16 Dec 90 19:06:41 GMT References: <1990Dec15.225015.8462@jarvis.csri.toronto.edu> Distribution: na Organization: National Instruments, Austin, TX Lines: 22 In article <1990Dec15.225015.8462@jarvis.csri.toronto.edu>, tracyn@dgp.toronto.edu (Tracy Narine) writes: > > I am writing a driver that has resources. The driver is being loaded by > an init. In my init I renumber all of the resources and then release them > so the new info is stored. When my driver is called though, the resources > don't seem to be there. They method I have taken is to OpenResFile of the > init in the driver. I think this should give the driver the resources > it needs but this is not happening because my driver keeps on crashing. > Can some please suggest what I might be doing wrong. > > tracy When loading your driver at init time, you ought to detach the driver resource at least. I think you want to renumber everything then load it all into memory and detach all the resources. You need to detach because as soon as the init finishes executing, its resource file is closed and the resource manager releases all the resources. From reading your post, I'm not sure it helps, but I hope it does. Russell Davoli National Instruments Corp.