home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!usc!noiro.acs.uci.edu!network.ucsd.edu!ucsbcsl!mcl!scott
- From: scott@mcl.ucsb.edu (Scott Bronson)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: SetHandleSize and SetPtrSize
- Message-ID: <scott.711758239@mcl>
- Date: 21 Jul 92 22:37:19 GMT
- References: <1992Jul18.160240.15039@welchgate.welch.jhu.edu>
- Sender: root@ucsbcsl.ucsb.edu
- Lines: 20
-
- In <1992Jul18.160240.15039@welchgate.welch.jhu.edu> francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:
-
- >I'm sorry if this is a FAQ or well known but here goes:
-
- >If I reduce the size of a handle/pointer using SetHandleSize or
- >SetPtrSize, do the contents of the handle/pointer get preserved
- >up to the size of my new handle/pointer. For example if I have a
- >handle of 30000 bytes and I am only using 20000 bytes, if I
- >set its size to 20000 bytes, will the contents be preserved?
-
-
- If this isn't a FAQ, it should be. I've seen three questions about
- SetHandleSize in the past week or so.
-
- Both calls retain as much data as is possible. So, when increasing the size,
- all bytes up to the old size will be what was there before, and all the bytes
- added will be undefined. When decreasing size, all bytes trunctated will be
- undefined, but all bytes still inside the block will be untouched.
-
- - Scott
-