Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!gate.oxy.edu!oxy!sonenbli From: sonenbli@oxy.edu (Andrew D. Sonenblick) Newsgroups: comp.sys.mac.programmer Subject: can I use PBHSetVol in this context... Message-ID: <109408@tiger.oxy.edu> Date: 6 Sep 90 04:05:59 GMT Organization: Occidental College, Los Angeles, CA 90041 Lines: 19 I would like to hear other programmer's opinions as to whether the following is "safe" or insights if they _know_ it is safe or unsafe: PBHSetVol is not recommended because, in a nutshell, it renders subsequent calls of GetVol or PBGetVol to receive current Volume Reference number instead of the current Working directory reference number which can cause many a program to fitfulize. But can I safely do this: GetVol(&volumeName,&savedVolume); PBHSetVol(...); /* do what I need to do */ SetVol(0,savedVolume); This scenario apparently avoids the PBHSetVol problem by restoring the working directory to what it was prior to the call. Am I right? Please gimme your two cents... Ando Moon. Sonenbli@oxy.edu