Path: utzoo!attcan!uunet!mcsun!cernvax!chx400!ethz!ethz-inf!mneerach From: mneerach@inf.ethz.ch (Matthias Ulrich Neeracher) Newsgroups: comp.sys.mac.programmer Subject: Re: Data Fork Of Currently Running APPL Message-ID: <29607@ethz-inf.UUCP> Date: 13 Jul 90 10:11:36 GMT References: <81985@tut.cis.ohio-state.edu> <561@ohs.UUCP> Organization: Informatik ETH Zurich Lines: 20 In article <561@ohs.UUCP> bhil@ohs.UUCP (Brian T. Hill) writes: >From article <81985@tut.cis.ohio-state.edu>, by topping@chinook.cis.ohio-state.edu (brian e topping): >> If you are working in C you can use the argv[] argument vectors passed to >> the main() procedure. The name of the program will be in a C string pointed >> to by argv[0]. If you want the dirID, you can get it by a _GetVol to find >> the working directory followed by a _GetWDInfo to find the dirID before you >> do any file system calls that change the world as the application started. >Hmm. I think I've read somewhere (TechNote maybe?) that you can't get the >application's dirID by getting the current dirID when the application is >first opened. Apparently, this method will fail if the application was >Launched by another application or some variation of that theme. There is also a (quite useful) INIT called DFaultD which lets users change the default folder at startup. As soon as somebody decides to use this with your application, there care problems. *************************************************************************** * Matthias Neeracher * I wouldn't recommend sex, drugs or insanity for * * mneerach@inf.ethz.ch * everyone, but they've always worked for me - HST * ***************************************************************************