Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!orion.oac.uci.edu!uci-ics!ucla-cs!oahu.cs.ucla.edu!tj From: tj@oahu.cs.ucla.edu (Tom Johnson) Newsgroups: comp.sys.mac.programmer Subject: Please help w/ PBSetCatInfo Message-ID: <30340@shemp.CS.UCLA.EDU> Date: 2 Jan 90 18:23:33 GMT Sender: news@CS.UCLA.EDU Reply-To: tj@oahu.cs.ucla.edu (Tom Johnson) Distribution: usa Organization: UCLA Computer Science Department Lines: 33 Can somebody please help??? The following is a small piece of code in Think C 4.0. Why can't I get it to work? #define SFSaveDisk 0x214 /*low memory global*/ myCInfoPBRec myInfoRec; Str255 directoryName; myInfoRec.dirInfo.ioNamePtr = directoryName; myInfoRec.dirInfo.ioDrDirID=MyCurDir; /* from SFGetFile as in DTS SC 018 */ myInfoRec.dirInfo.ioFDirIndex = -1; /*directories only*/ myInfoRec.dirInfo.ioVRefNum =(-*(short *)SFSaveDisk); error=PBGetCatInfo(&myInfoRec,false); if (error != noErr) SysBeep(10); /*I was making a few changes here, but even when they were removed, the problem didn't go away*/ error=PBSetCatInfo(&myInfoRec,false); if (error != noErr) Debugger(); When I run this code, no error is detected on the PBSetCatInfo call and the CInfoPBRec appears to be correctly filled in, but PBSetCatInfo returns error=FFD5 a fnfError (file not found). Does anybody have any idea why? This has been driving me crazy for hours!! Thanks. Tom -- Tom Johnson UCLA Computer Science Department 3413 Boelter Hall, Los Angeles CA 90024 (213)825-6952 UUCP: {uunet,rutgers,ucbvax}!cs.ucla.edu!tj Internet: tj@cs.ucla.edu