home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!darkstar.UCSC.EDU!cats.ucsc.edu!speth
- From: speth@cats.ucsc.edu (James Gustave)
- Newsgroups: comp.sys.mac.programmer
- Subject: URGENT Help needed with PBHSetFInfo !!!
- Date: 10 Jan 1993 07:17:34 GMT
- Organization: University of California; Santa Cruz
- Lines: 39
- Message-ID: <1ioiieINN72a@darkstar.UCSC.EDU>
- NNTP-Posting-Host: am.ucsc.edu
-
-
- I have a file's FSSpec and I need to change some of its characteristics.
- I start by getting an HFileParam by calling PBHGetFInfo, then I change the
- necessary attributes, and use PBHSetFInfo. There's no problem getting the
- HFileParam, but I get an error (-43 file not found) when setting it.
-
- I thought that by calling PBHGetFInfo right before PBHSetFInfo, it would have
- all the right info to locate the file. What am I doing wrong?
- Here's a sample of what I'm trying to do:
-
- void test(FSSpec myFile)
- {
- HFileParam myFileParam;
- OSErr myErr;
-
- myFileParam.ioNamePtr = myFile.name;
- myFileParam.ioVRefNum = myFile.vRefNum;
- myFileParam.ioDirID = myFile.parID;
- myFileParam.ioFDirIndex = 0;
-
- myErr = PBHGetFInfo(&myFileParam, FALSE);
-
- if (myErr)
- HandleTheError();
-
- myFileParam.ioFlFndrInfo.fdType = 'APPL';
- myFileParam.ioFlFndrInfo.fdCreator = 'JIMS';
-
- myErr = PBHSetFInfo(&myFileParam, FALSE);
-
- if (myErr)
- HandleTheError();
- }
-
- Thanks for the help.
-
- --
- ________________________________________________________________________________
- james speth finger for pgp 2.0 public-key speth@cats.ucsc.edu
-