Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!brutus.cs.uiuc.edu!apple!oracle!news From: omullarn@oracle.oracle.com (Oliver Mullarney) Newsgroups: comp.sys.mac.programmer Subject: Re: HLock Message-ID: <1989Dec19.001739.17771@oracle.com> Date: 19 Dec 89 00:17:39 GMT References: <3331@hub.UUCP> <9313@hoptoad.uucp> Reply-To: omullarn@oracle.com (Oliver Mullarney) Organization: Oracle Corporation, Belmont, CA Lines: 21 In article <9313@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: > >Rect r; >r = (*theControl)->contrlRect; >RectRgn(myRgn, &r); > as a way of avoiding using HLock and HUnlock. Not in this case. What you are handing to RectRgn is a pointer into a relocatable block. It may look like a legitimate pointer, but it is not, so this *can* crap out. HLock and HUnlock are probably the best solution in this case, or the HGetState and HSetState calls. | Oliver Mullarney | "I have knowledge of Digital Watches, and soon I | | Oracle Corporation | shall have knowledge of Video Cassette Recorders" | | omullarn@oracle.com | Time Bandits | --------------- "Universally acknowledged to work just fine" ---------------- | Oliver Mullarney | "I have knowledge of Digital Watches, and soon I | | Oracle Corporation | shall have knowledge of Video Cassette Recorders" | | omullarn@oracle.com | Time Bandits | --------------- "Universally acknowledged to work just fine" ----------------