Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcvax!sunic!kth!draken!d88-jwa From: d88-jwa@nada.kth.se (Reply via mail or intl. +46 8 258 268...) Newsgroups: comp.sys.mac.programmer Subject: Re: Altering the Resouce fork Keywords: resource,fork,C Message-ID: <1452@draken.nada.kth.se> Date: 22 Aug 89 15:15:34 GMT References: <1492@unocss.UUCP> Reply-To: d88-jwa@nada.kth.se (Jon W{tte) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 33 In article <1492@unocss.UUCP> payne@unocss.UUCP (Matt Payne) writes: >Can a program be made to alter its own resource fork? Toward the >purpose of chaning where windows come up on the screen when they >are first brought up, etc. It is a good idea to save away data for your windows location etc. This is actually endorsed by Apple Computer (TM, Inc) and described in a TechNote. This TechNote tells you to save away such data ("Preferences") in a file, preferrably in the startup system folder. The VRefNum of this folder is available from the SysEnvirons call. You should NOT change the resource frok of the program, since it will then not be sharable over networks. Apple has carefully instructed us in treating the resource fork as "read only" (Which means that it may eventually actually be that way .-|) So get on with designing a "stationery ICN#" and saving your prefs in the system folder. The resource fork of THIS file you can modify as much as you like, since (hopefully) you'll only run one app of the same type using any one startup system. If you want to be * REALLY * paranoid, you could name the prefs file after the Applications name (not har-code it) thus making it possible to use more than one copies of the same app at the same time on the same machine. (Ungh. Is there a -v option (non-verbose) on me ?? ,-) Happy hacking! h+@nada.kth.se -- This is your fortune from h+@nada.kth.se: You cannot achieve the impossible without attempting the absurd.