Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!mips!sgi!cdp!jeff From: jeff@cdp.UUCP Newsgroups: comp.windows.ms.programmer Subject: Re: Message hooks, anyone? Message-ID: <1266500003@cdp> Date: 2 Apr 91 06:21:00 GMT References: <856689766@1991Mar29.175435.15161@javelin.e> Lines: 11 Nf-ID: #R:1991Mar29.175435.15161@javelin.e:856689766:cdp:1266500003:000:434 Nf-From: cdp.UUCP!jeff Apr 1 22:21:00 1991 One thing to be careful about with UnhookWindowsHook: for at least some hooks, calling this routine causes Windows to generate one last call to the hook routine, with the ncode parameter set to -1. You need to be prepared to handle this case: you not free the ProcInstance until UnhookWindowsHook returns, and your hook routine (when it receives this code) must call DefHookProc. Jeff Dean jeff@cdp.igc.org uunet!pyramid!cdp!jeff