Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!dino!ux1.cso.uiuc.edu!tank!gft_robert@gsbacd.uchicago.edu From: gft_robert@gsbacd.uchicago.edu Newsgroups: comp.sys.mac.programmer Subject: PBHGetVInfo returns noErr but volRefNum=-1 Message-ID: <9166@tank.uchicago.edu> Date: 7 May 90 22:03:36 GMT Sender: news@tank.uchicago.edu Organization: University of Chicago Graduate School of Business Lines: 30 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: volName := concat(volName, ':'); paramBlock := HParmBlkPtr(NewPtr(SIZEOF(HParamBlockRec))); if paramBlock <> nil then begin paramBlock^.ioCompletion := nil; paramBlock^.ioNamePtr := @volName; paramBlock^.ioVRefNum := 0; paramBlock^.ioVolIndex := -1; theOSErr := PBHGetVInfo(paramBLock, FALSE); etc. I get noErr (0) for theOSErr, but ioVRefNum comes back as -1. What am I doing wrong? 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.) Robert ============================================================================ = gft_robert@gsbacd.uchicago.edu * generic disclaimer: * "It's more fun to = = * all my opinions are * compute" = = * mine * -Kraftwerk = ============================================================================