Path: utzoo!utgpu!watmath!clyde!att!rutgers!deimos!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxe.cso.uiuc.edu!leonardr From: leonardr@uxe.cso.uiuc.edu Newsgroups: comp.sys.mac.programmer Subject: Re: finding system folder and MPW C Message-ID: <226000032@uxe.cso.uiuc.edu> Date: 2 Dec 88 18:56:00 GMT References: <7800002@b-mrda.UUCP> Lines: 33 Nf-ID: #R:b-mrda.UUCP:7800002:uxe.cso.uiuc.edu:226000032:000:1652 Nf-From: uxe.cso.uiuc.edu!leonardr Dec 2 12:56:00 1988 >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. >> > >You can get the information you need from the SysEnvRec (the sysVRefNum >field). It contains the wdRefnum of the currently active system folder. > Just to clarify what Dennis said...You should call SysEnvirons which will return to you a SysEnvRec. One of the fields of the SysEnvRec is sysVRefNum which contains that wdRefnum of the current System Folder (blessed folder). Code wise (in C) this looks like: myOSErr = SysEnvirons(version, &myEnvirons); sysVRef = myEnvirons.sysVRefNum; (version is an integer (short) which defines what version of SysEnvirons you want (currently highest version is 2)) +---------------------------------+-----------------------------------+ + + Any thing I say may be taken as + + Leonard Rosenthol + fact, then again you might decide+ + President, LazerWare, inc. + that it really isn't, so you + + + never know, do you?? + + leonardr@uxe.cso.uiuc.edu + + + GEnie: MACgician + MacNET: MACgician + + Delphi: MACgician + AppleLink: D0025 + + + + +---------------------------------+-----------------------------------+