Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ncar!midway!quads.uchicago.edu!chh9 From: chh9@quads.uchicago.edu (Conrad Halton Halling) Newsgroups: comp.sys.mac.programmer Subject: Question about resource handle. Message-ID: <1991Jun27.174311.18097@midway.uchicago.edu> Date: 27 Jun 91 17:43:11 GMT Sender: news@midway.uchicago.edu (NewsMistress) Organization: University of Chicago Lines: 26 I recently started programming using Think C. I would like advice on a simple, beginner's question for which I cannot find the answer in Inside Macintosh. I have stored tables of 64 doubles as different IDs of resource type 'CDNT'. My program will load one table from a specific ID (chosen by the user) and use the doubles in the table in a long series of calculations. For simplicity, I want to lock the handle to the resource so I can use a pointer in my calculations. I realize the size of this resource (640 bytes) is small, but I would like to know which is the best strategy for locking the handle: 1) I could set the "locked" attribute in the resource file, so that the handle is locked immediately when the resource is loaded into the application heap. 2) I could get the resource without the "locked" attribute set, then MoveHHi( myHandle ) and HLock( myHandle ). Thanks in advance for any help. E-mail replies will be sufficient, altho I read this newsgroup regularly. -- Con Halling chh9@midway.uchicago.edu