Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!mailrus!ncar!mephisto!mcnc!kk From: kk@mcnc.org (Krzysztof Kozminski) Newsgroups: comp.sys.mac.programmer Subject: Re: PBHGetVInfo returns noErr but volRefNum=-1 Message-ID: <2074@speedy.mcnc.org> Date: 8 May 90 04:08:03 GMT References: <9166@tank.uchicago.edu> Reply-To: kk@mcnc.org.UUCP (Krzysztof Kozminski) Organization: MCNC; RTP, NC Lines: 26 In article <9166@tank.uchicago.edu> gft_robert@gsbacd.uchicago.edu writes: >Well, I have for the first time delved into the PB calls, and am having some >problems. At one point in my program I'm trying to convert a volume name to a >vol ref num and I do the following: > [OK code deleted] >I get noErr (0) for theOSErr, but ioVRefNum comes back as -1. What am I doing >wrong? Nothing wrong, -1 is a correct result. volRefNums are small negative numbers. Perhaps you're thinking about path reference numbers (like those returned by the standard file dialogs) to be used with things like FSOpen and such. To get a large negative number you expect (I think) you'll need to make a working directory. Or, alternately, use hierarchical versions of the file routines (see TN 218). >Any info much appreciated! (BTW, is there a clearer exposition of the PB calls >in general than in IM IV? I've re-read it a couple of times, and though it's >well-written, it could be a bit more explicit at times.) Technical Notes can clarify some things, and some sample code therein is quite informative... KK -- Kris Kozminski kk@mcnc.org "The party was a masquerade; the guests were all wearing their faces."