home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!darkstar.UCSC.EDU!cats.ucsc.edu!speth
- From: speth@cats.ucsc.edu (James Gustave)
- Newsgroups: comp.sys.mac.programmer
- Subject: Help needed with GetFInfo()
- Date: 6 Jan 1993 20:54:43 GMT
- Organization: University of California; Santa Cruz
- Lines: 25
- Message-ID: <1ifgukINNj1u@darkstar.UCSC.EDU>
- NNTP-Posting-Host: am.ucsc.edu
-
-
- I'm using GetFInfo to get the TYPE and CREATOR codes of a file, but I'm having
- problems. I'm passing the file's FSSpec to my function which looks like this:
-
- void MyFunction(FSSpec inputFile)
- {
- short inFileRefNum;
- FInfo finderInfo;
- char *fileType = (char *) &finderInfo.fdType;
- char *fileCreator = (char *) &finderInfo.fdCreator;
-
- GetFInfo(inputFile.name, inputFile.vRefNum, &finderInfo);
- ....
- }
-
- I'm then using fileType and fileCreator. Like this, I get garbage, but if I
- change the second argument to GetFInfo to 0 instead of inputFile.vRefNum, and
- the file I'm using is in the default directory, it works fine. What am I
- missing?? The vRefNum from the FSSpec should be OK, right? Argh.
-
- Thanks.
-
- --
- ________________________________________________________________________________
- james speth finger for pgp 2.0 public-key speth@cats.ucsc.edu
-