Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!rutgers!orstcs!prism!mullerd From: mullerd@prism.cs.orst.edu (Douglas Muller) Newsgroups: comp.sys.mac.programmer Subject: Re: More Vol RefNum + WD ID Help Needed Message-ID: <1991Jun09.191839.1809@lynx.CS.ORST.EDU> Date: 9 Jun 91 19:18:39 GMT References: <1991Jun9.062859.3306@gpu.utcs.utoronto.ca> Sender: @lynx.CS.ORST.EDU Organization: Oregon State University, Computer Science Dept. Lines: 31 Nntp-Posting-Host: prism.cs.orst.edu In article <1991Jun9.062859.3306@gpu.utcs.utoronto.ca> topix@gpu.utcs.utoronto.ca (R. Munroe) writes: >By now I feel fairly brain dead. I got lots of help when I posted >my last message about saving file info into a prefs file so I could >open the files from a menu in my app. Most replies said to save >the volume name, working directory ID, and file name. I think that >I have successfully done that. I now am trying to use that info to >open up the file. No luck. Here is the code I use to store the info: > > WDPBRec wdpb; > > if (reply.good) > { > wdpb.ioCompletion = NIL_POINTER; > wdpb.ioNamePtr = (StringPtr)name; /* just used as a place holder */ > wdpb.ioVRefNum = reply.vRefNum; > wdpb.ioWDIndex = 0; > wdpb.ioWDDirID = 0; > > error = PBGetWDInfo (&wdpb, FALSE); > > /* ..... save wdpb.ioNamePtr, wdpb.ioWDDirID, and reply.fName > into prefs file ..... */ > } You need to save wdpb.ioNamePtr, wdpb.ioVRefNum, wdpb.ioWDDirID and use THEM later! (pretty sure) >Bob Munroe >topix@utcs.utoronto.ca Stephen Roderick mullerd@prism.cs.orst.edu