Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sun-barr!apple!well!brecher From: brecher@well.UUCP (Steve Brecher) Newsgroups: comp.sys.mac.programmer Subject: Re: Purge or Revert Resource? Message-ID: <12440@well.UUCP> Date: 27 Jun 89 23:12:42 GMT References: <82203@ti-csl.csc.ti.com> Reply-To: brecher@well.UUCP (Steve Brecher) Organization: Software Supply, Sunnyvale, CA Lines: 17 In article <82203@ti-csl.csc.ti.com>, holland@m2.csc.ti.com (Fred Hollander) writes: > I want to revert a resource that is already loaded into memory by reading the > resource from the resource file and discarding any changes. I also want to > keep the same handle to the resource. Can this be done? LoadResource won't > do anything if it's already loaded. I can't find a PurgeResource procedure. > Is there any way to force a resource to be purged or to force a resource to > be reloaded? HUnlock(RsrcHandle); {if it might have been locked} EmptyHandle(RsrcHandle); {this is the "PurgeResource" you sought} LoadResource(RsrcHandle); -- brecher@well.UUCP (Steve Brecher)