Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!amdahl!pacbell!att!ttrdc!ttrde!ttrdf!fjo From: fjo@ttrdf.UUCP (Frank Owen ) Newsgroups: comp.sys.mac.programmer Subject: Re: Multifinder: how do I patch GetNextEvent? Message-ID: <753@ttrdf.UUCP> Date: 17 Oct 88 20:41:49 GMT References: <5654@hoptoad.uucp> Organization: AT&T, Skokie, IL Lines: 26 in article <5654@hoptoad.uucp>, tim@hoptoad.uucp (Tim Maroney) says: > > Let's look at a case. Say that GetNamedResource checks the return address > to see if it's being called from a ROM Font Manager routine, and that routine > has a tail patch for some reason. When the "old" software for the Font > Manager calls the Resource Manager, the return address is exactly what the > Resource Manager "where-from" check expects. Bad example. Change it so that you put a tail patch on the GetNamedResource trap. Now when it checks the return address to see if it's being called from ROM Font Manager (patched or not) it will discover that the return address is somewhere in your patch. NOT in the ROM Font Manager, even if the ROM Font Manager DID make the GetNamedResource call. Another case. Say that Multifinder's GetNextEvent needs to know who called it so that it can determine if an application's been getting alot of null-events in a row. Now you put a tail patch on GetNextEvent. Well, when Multifinder looks to see who had called it, it always sees your patch. It effectively thinks that ALL GetNextEvent calls are coming from the same application. -- Frank Owen (fjo@ttrdf) 312-982-2182 AT&T Bell Laboratories 5555 Touhy Ave., Skokie, IL 60077 PATH: ...!att!ttrdf!fjo