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