Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK Pascal vs. PBGetFCBInfo on System file Message-ID: <1987@husc6.harvard.edu> Date: 28 Feb 90 18:24:47 GMT References: <4107@hub.UUCP> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Organization: Symantec Language Products Group Lines: 33 In article <4107@hub.UUCP> 6600pete@ucbsuxa.ucsb.edu (GurgleKat [Pete Gontier]) writes: >I'm in the process of writing a ShutDown proc that needs to know where the >Blessed Folder is, and apparently the working directories are all gone at >volume unmount time. That's by way of introduction; I imagine someone will >have an explanation for it. What I did to solve the perceived problem was >to use PBGetFCBInfo on the System file, the 'real' refNum of which I got >by playing games with UseResFile and CurResFile. So now I know where the >Blessed Folder is without SysEnvRec.sysVRefNum and PBGetWDInfo. Nice. But >when I try to call PBGetFCBInfo while in the THINK Pascal environment, >everything hangs about 75% of the time. The ShutDown proc itself hasn't >hung yet. THINK Pascal tries to give me a thumbs down on the offending >call, but after it puts up the hand, it's hung. I would suggest that you use the approach given in Technical Note #67 ("Finding the blessed Folder"), which describes how to find the dirID of the system folder using a PBHGetVInfo. I suspect it's considerably safer than screwing around with the resource map ordering. R. ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "When someone who makes four hundred and fifty dollars an hour wants to tell you something for free, it's a good idea to listen." ~~~~~~~~~~~~~~~