Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!inebriae!al From: al@inebriae.UUCP (Al Evans) Newsgroups: comp.sys.mac.programmer Subject: Re: Purge or Revert Resource? Message-ID: <376@inebriae.UUCP> Date: 26 Jun 89 19:09:05 GMT References: <82203@ti-csl.csc.ti.com> <689@biar.UUCP> Reply-To: al@inebriae.UUCP (Al Evans) Organization: PowerTools Lines: 31 In (some lost attribution line), Robert writes.... >Check out DetachResource. Assuming H is a handle to a resource such as >returned by GetResource, DetachResource(H) ``unlinks'' the handle so >the resource manager no longer recognises it as a handle to a resource. > >So you can do something like this: > > DetachResource(H); > DisposHandle(H); > H:=GetResource('DERF',0); > >to do your reversion. I'm pretty sure that H will point to the same master >pointer after the GetResource call. IM-I has some diagrams in the Resource >Manager chapter that explain DetachResource quite well. I could be wrong, but I see nothing in IM which would imply this is true. Seems to me it would be equivalent to saying: DisposHandle(H); H:= NewHandle(someSize); and expecting H to be the same before and after. Though this may effectively be the case, I don't think anything in IM *guarantees* it. --Al Evans-- -- Al Evans {tndev,texbell,ssbn}!inebriae!al al@inebriae.WLK.COM