Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!usc!rutgers!ncs.dnd.ca!asterix.drev.dnd.ca!louis From: louis@asterix.drev.dnd.ca (Louis Demers) Newsgroups: comp.sys.mac.programmer Subject: Re: cdev - INIT Data Exchange Keywords: cdev, INIT Message-ID: <1990Jun5.142604.11826@asterix.drev.dnd.ca> Date: 5 Jun 90 14:26:04 GMT References: <2695@cooper.cooper.EDU> <55045@microsoft.UUCP> Organization: DREV, Defence Research Est. Valcartier Lines: 29 t-alexc@microsoft.UUCP (Alex CHAFFEE) writes: >My favorite way is to have the INIT write a resource of type 'ADDR' >into the preferences file (which should be buried safe in the system >folder). The contents of this resource is just a longword pointing >to the location of the shared data -- it can be a handle, or a >pointer, or the proper value of A4. This is done once at startup, >which is fine because the INIT code and data should be locked in >memory for the duration.. >This sounds kludgey, but it's actually quite clean and compatible. >The INIT is guaranteed a writable system folder, even if it's been >launched from a server. The existence and validity of the resource >provides a quick way for the cdev to tell if the INIT's been loaded. What happens if you disable the init and it is not loaded. Your resource is still there pointing to some area it has no right to claim. Upon shutdown, Do you remove this resource ? what happens if you crash ? One way of validating this resource would be to compare for how long the mac has been booted and the modification time of the preference file. Is that what you do ? An interested reader Louis -- | Louis Demers | DREV, Defence Research Establishment,Valcartier | | louis@asterix.drev.dnd.ca | POBox 8800, Courcelette,Quebec, CANADA, G0A 1R0 | | (131.132.48.2) | Office: (418) 844-4424 fax (418) 844-4511 | +---------------------------+-------------------------------------------------+