home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18311 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1.9 KB  |  50 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. 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
  3. From: aep@world.std.com (Andrew E Page)
  4. Subject: Re: problems with opening a file with FSpOpenDF
  5. Message-ID: <BxLurI.Jsr@world.std.com>
  6. Organization: The World Public Access UNIX, Brookline, MA
  7. References: <1992Nov11.225447.15606@mcs.drexel.edu>
  8. Distribution: usa
  9. Date: Thu, 12 Nov 1992 13:28:30 GMT
  10. Lines: 38
  11.  
  12. In article <1992Nov11.225447.15606@mcs.drexel.edu> udmorrow@mcs.drexel.edu (Daniel Morrow) writes:
  13. >I'm calling StandardGetFile which pases back a StandardFileReply in
  14. >one of it's parameters.
  15. >
  16. >Then, All I'm trying to do is use open the file with FSpOpenDF
  17. >using the sfFile field of the StandardFileReply type variable.
  18. >
  19. >Like this:
  20. >    StandardGetFile(0L, 1, typeList, &reply);
  21. >    sfFile = reply.sfFile;
  22. >    xErr = FSpOpenDF(&sfFile, fsRdWrPerm, &refNum);
  23. >
  24. >Anyway, no matter which file I choose, the refNum is always the same.
  25. >
  26.  
  27.    There is nothing about a refNum that specifies 'which file this
  28. is'.  It's an identifier handed out by the Operating System when
  29. you open up a file.  If you were to do another 'FSpOpenDF' on a 
  30. different FileSpec right after that you would get a different
  31. number.  
  32.    Typically you shouldn't have to concern yourself with what the
  33. refNums' value is.  Only worry about it when you make a call
  34. to FSRead, FSWrite, etc.. and you get back a rfNumErr(Bad reference
  35. number).  
  36.  
  37. >The sfFile variable has the correct information in it but when it
  38. >gets passed to FSpOpenDF, the refNum goes weird.
  39. >
  40. >Is there a better way to do this?   
  41. >
  42. >-Dan.
  43. >udmorrow@mcs.drexel.edu
  44.  
  45.  
  46. -- 
  47. Andrew E. Page   (Warrior Poet) |   Decision and Effort The Archer and Arrow
  48. Mac Consultant                  |     The difference between what we are
  49. Macintosh and DSP Technology    |           and what we want to be.
  50.