Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!haven!mimsy!mojo!russotto From: russotto@eng.umd.edu (Matthew T. Russotto) Newsgroups: comp.sys.mac.programmer Subject: Re: INIT/cdev communication question Message-ID: <1991Mar26.185524.2932@eng.umd.edu> Date: 26 Mar 91 18:55:24 GMT References: <91083.154101CXT105@psuvm.psu.edu> Sender: news@eng.umd.edu (C-News) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 21 In article <91083.154101CXT105@psuvm.psu.edu> CXT105@psuvm.psu.edu (Christopher Tate) writes: >Is there anything wrong with this scheme: > >My INIT opens up a resource of a custom type and ID (chosen to minimize >possible conflicts) which contains the data which needs to be shared by >the INIT and the cdev. Since the INIT file is first in the resource >search chain, the INIT will always open the resource out of its own >file. > >The resource is MoveHHi'd into the top of the system heap and locked >down, but *not* DetachResource'd. The INIT gets various information >from this resource when needed. > >Now, the cdev calls GetResource() on that same resource type and ID. >themselves. Anyone see anything wrong with this approach? Just one, fatal, flaw. What happens when INIT 31 CloseResFile's your INIT? -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu .sig under construction, like the rest of this campus.