Newsgroups: comp.windows.ms.programmer
Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: GetProcAddress() in a DLL
Message-ID: <1991May24.160514.14277@hyper.hyper.com>
Keywords: win3 DLL SetWindowsHook
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <glenn.674521319@imagen> <1991May21.205525.10557@dbase.A-T.COM> <1991May22.145944.27437@dbase.A-T.COM>
Date: Fri, 24 May 1991 16:05:14 GMT

In article <1991May22.145944.27437@dbase.A-T.COM> jamesc@dbase.UUCP (James Chuang ) writes:
>
>Okay, I got a hook of JOURNALRECORD going.  The only thing the callback
>function does is call Messagebeep() currently.  So as I move the mouse, the
>machine beeps like crazy.
>However, as soon as I launch an app, such as Notepad, a UAE comes up, and
>the system hard crashes.  CVW shows a failure somewhere in windows.  Would
>anyone please share experience in using JOURNALRECORD?
>Also, since SetWindowsHook() returns NULL for the next filter in chain,
>does my callback function need to call DefWindowsHook?  if so, what
>do I call it with?
>Is there a good book with all this in it?  I know Petzold`s doesn't address
>this....
Things to look out for:

* Make sure your hook function calls DefHookProc() whenever
  nCode is less than 0.

* Make sure the code segment containing the hook function is
  fixed.

Call DefHookProc(), even though *lplpfnNextHook == NULL.

cheers - Paul Bonneau.

P.S.	I could tell you more, but the server that contains
	our source is down right now.
