home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14716 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.7 KB

  1. Path: sparky!uunet!usc!wupost!zaphod.mps.ohio-state.edu!malgudi.oar.net!uoft02.utoledo.edu!desire.wright.edu!jmatthews
  2. Newsgroups: comp.sys.mac.programmer
  3. Subject: Re: How to save a PICT file?
  4. Message-ID: <1992Aug29.003233.3802@desire.wright.edu>
  5. From: jmatthews@desire.wright.edu
  6. Date: 29 Aug 92 00:32:33 EST
  7. Followup-To: comp.sys.mac.programmer
  8. References: <5hnyk1d@rpi.edu> <1992Aug26.000749.3750@desire.wright.edu> <zben-280892151439@zben-mac-ii.umd.edu>
  9. Distribution: usa
  10. Organization: Wright State University 
  11. Lines: 24
  12.  
  13. In article <zben-280892151439@zben-mac-ii.umd.edu>, zben@ni.umd.edu (Charles B. Cranston) writes:
  14. > In article <1992Aug26.000749.3750@desire.wright.edu>,
  15. > jmatthews@desire.wright.edu wrote:
  16. >...
  17. >>         count := GetHandleSize(Handle(picHdl));
  18. >>         ErrCheck(FSWrite(fRefNum, count, Ptr(picHdl^)));
  19. >... 
  20. > Ahem, wouldn't it be a good idea to lock the handle while writing
  21. > it out?  I wasn't aware _Write refrained from moving memory.  Please
  22. > correct me if I'm wrong about this...
  23.  
  24. An excellent question. An expression such as Ptr(picHdl^) creates a
  25. copy of a master pointer; the original will change if the block to
  26. which it points gets moved. Fortunately, I haven't found _Write on
  27. any list of traps that move memory (IM vol I-VI; THINK Reference).
  28.  
  29. I suppose that believing _Write will never move memory in the future
  30. is a shade optimistic. I hope the "lock everything" partisans don't
  31. don't wind up being too right:-)
  32.  
  33. o----------------------------------------------------------------------------o
  34. | John B. Matthews, jmatthews@desire.wright.edu, disclaimer:= myViews <> WSU |
  35. | "I'm a commensal .sig virus, indistinguishable from an ordinary organelle."|
  36. o----------------------------------------------------------------------------o
  37.