home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!eff!world!aep
- From: aep@world.std.com (Andrew E Page)
- Subject: Re: problems with opening a file with FSpOpenDF
- Message-ID: <BxLurI.Jsr@world.std.com>
- Organization: The World Public Access UNIX, Brookline, MA
- References: <1992Nov11.225447.15606@mcs.drexel.edu>
- Distribution: usa
- Date: Thu, 12 Nov 1992 13:28:30 GMT
- Lines: 38
-
- In article <1992Nov11.225447.15606@mcs.drexel.edu> udmorrow@mcs.drexel.edu (Daniel Morrow) writes:
- >I'm calling StandardGetFile which pases back a StandardFileReply in
- >one of it's parameters.
- >
- >Then, All I'm trying to do is use open the file with FSpOpenDF
- >using the sfFile field of the StandardFileReply type variable.
- >
- >Like this:
- > StandardGetFile(0L, 1, typeList, &reply);
- > sfFile = reply.sfFile;
- > xErr = FSpOpenDF(&sfFile, fsRdWrPerm, &refNum);
- >
- >Anyway, no matter which file I choose, the refNum is always the same.
- >
-
- There is nothing about a refNum that specifies 'which file this
- is'. It's an identifier handed out by the Operating System when
- you open up a file. If you were to do another 'FSpOpenDF' on a
- different FileSpec right after that you would get a different
- number.
- Typically you shouldn't have to concern yourself with what the
- refNums' value is. Only worry about it when you make a call
- to FSRead, FSWrite, etc.. and you get back a rfNumErr(Bad reference
- number).
-
- >The sfFile variable has the correct information in it but when it
- >gets passed to FSpOpenDF, the refNum goes weird.
- >
- >Is there a better way to do this?
- >
- >-Dan.
- >udmorrow@mcs.drexel.edu
-
-
- --
- Andrew E. Page (Warrior Poet) | Decision and Effort The Archer and Arrow
- Mac Consultant | The difference between what we are
- Macintosh and DSP Technology | and what we want to be.
-