Path: utzoo!utgpu!watmath!clyde!att!rutgers!mcnc!xanth!ames!claris!apple!han From: han@Apple.COM (Byron Han, Architect) Newsgroups: comp.sys.mac.programmer Subject: Re: finding system folder and MPW C Message-ID: <21532@apple.Apple.COM> Date: 2 Dec 88 05:21:11 GMT References: <7800002@b-mrda.UUCP> Organization: Apple Products - Networking & Communications Lines: 42 In article <7800002@b-mrda.UUCP> jim@b-mrda.UUCP (Jim Sadler) writes: > >Where do I find the information to have a program find the system folder that >is currently active, when the system folder is on a diffent volume than the >application. I want to do this using MPW C. Any info would be appreciated. > Technical Note 67. "Finding the <>" FUNCTION GetBlessed(vRefNum: INTEGER; VAR blessed: LONGINT): OSErr; VAR myHPB: HParamBlockRec; error: OSErr; BEGIN blessed := 0; WITH myHPB DO BEGIN ioNamePtr := NIL; ioVRefNum := vRefNum; ioVolIndex := 0; error := PBHGetVInfo(@myHPB, FALSE); IF error = noErr THEN blessed := ioVFndrInfo[1]; END; {with} GetBlessed := error; END; It is easy to convert to MPW C. Please check the tecnical note for to see if I made any typos. +-----------------------------------------------------------------------------+ | Disclaimer: Apple has no connection with my postings. | +-----------------------------------------------------------------------------+ Byron Han, Communications Architect Macintosh xxx: The Next Generation... Apple Computer, Inc. ------------------------------------- 20525 Mariani Ave, MS27Y Internet: han@apple.COM Cupertino, CA 95014 UUCP:{sun,voder,nsc,decwrl}!apple!han -------------------------------------- GENIE: BYRONHAN ATTnet: 408-974-6450 Applelink: HAN1 CompuServe: 72167,1664 ------------------------------------------------------------------------------