6600pete@ucbsuxa.ucsb.edu (GurgleKat [Pete Gontier]) (02/28/90)
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. Rich? Pete Gontier | InterNet: 6600pete@ucsbuxa.ucsb.edu, BitNet: 6600pete@ucsbuxa Editor, Macker | Online Macintosh Programming Journal; mail for subscription Hire this kid | Mac, DOS, C, Pascal, asm, excellent communication skills
siegel@endor.harvard.edu (Rich Siegel) (03/01/90)
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." ~~~~~~~~~~~~~~~
6600pete@ucsbuxa.ucsb.edu (GurgleKat [Pete Gontier]) (03/03/90)
From article <1987@husc6.harvard.edu>, by siegel@endor.harvard.edu (Rich Siegel): > In article <4107@hub.UUCP> 6600pete@ucbsuxa.ucsb.edu (GurgleKat [Pete Gontier]) writes: >>when I try to call PBGetFCBInfo while in the THINK Pascal environment, >>everything hangs about 75% of the time. > 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. You're probably right. However, that doesn't answer my question. I may want to use PBGetFCBInfo at some point in the future and I might run into this problem then, as well. Anyway, the problem has managed to 'go away.' It lasted across several boot cycles, so I was convinced it wasn't the state of the machine. Now it seems to work OK. -- Pete Gontier | InterNet: 6600pete@ucsbuxa.ucsb.edu, BitNet: 6600pete@ucsbuxa Editor, Macker | Online Macintosh Programming Journal; mail for subscription Hire this kid | Mac, DOS, C, Pascal, asm, excellent communication skills