Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!oliveb!pyramid!voder!apple!han From: han@apple.UUCP Newsgroups: comp.sys.mac Subject: Re: GetTrapAddress and SetTrapAddress? Message-ID: <986@apple.UUCP> Date: Wed, 10-Jun-87 19:37:44 EDT Article-I.D.: apple.986 Posted: Wed Jun 10 19:37:44 1987 Date-Received: Sat, 13-Jun-87 06:43:21 EDT References: <164500036@uiucdcsb> Organization: Apple Computer, Inc., Cupertino, USA Lines: 37 In article <164500036@uiucdcsb>, kkim@uiucdcsb.cs.uiuc.edu writes: > > I would like to intercept calls to an Operating System or > Toolbox routine (specifically, GetNextEvent) and do some pre- or > post-processing of my own. GetTrapAddress and SetTrapAddress > seem useful to do it. Actually, there is a hook for GetNextEvent which may be used (although the use of low memory globals that are not documented in Inside Macintosh is discouraged). There was an article about it in MacTutor last year or so. I believe the global is JGNEFilter or something like that. You might want to look up that issue. > ... > > 2. I also have one question. It is said that > > Since the trap dispatch table can address locations within a > range of only 64K bytes from the beginning of the system heap, > the routine you install should be in the system heap. > > How can I put my own version in the system heap? > Traps patches, when done, should be placed in the Application Heap according to current doctrine. This is to maintain compatability with future operating system considerations. ===================================================================== Byron Han | UUCP: {sun,voder,nsc,mtxinu,dual}!apple!han Apple Computer, Inc. | CSNET: han@apple.csnet 20525 Mariani Ave, | ATTNet: 408-973-6450 Cupertino, CA 95014 | GENIE: BYRONHAN APPLELINK: HAN1 MS 27Y | CSERVE: 72167,1664 ===================================================================== All opinions and statements do not necessarily represent those of my employer, Apple Computer Inc. =====================================================================