Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: HLock Message-ID: <17968@dartvax.Dartmouth.EDU> Date: 19 Dec 89 01:45:40 GMT References: <3331@hub.UUCP> <9313@hoptoad.uucp> <1989Dec19.001739.17771@oracle.com> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Dartmouth College, Hanover, NH Lines: 20 In article <1989Dec19.001739.17771@oracle.com> omullarn@oracle.com (Oliver Mullarney) writes: ... >HLock and HUnlock are probably the best solution in this case, or the >HGetState and HSetState calls. One thing to remember when using HGetState and HSetState is that these are not available on early (64k ROM) machines, so you have to test for machine type or trap availability before using them. For an application program which probably owns all the Handles it deals with, HLock and HUnlock are appropriate nearly all the time. For code resources which manipulate data owned by applications or the system, H[GS]etState is a more application- friendly technique, if available. Earle R. Horton ZZ :wq .STOP ^C^C^C ^Z^Z^Z exit/save (emacs-save-files-and-die nil t)