Lindsay
Mon Aug 22 09:40:44 CDT 2005
Thanks Doug. I'll give it a whirl.
"Doug Harrison [MVP]" <dsh@mvps.org> wrote in message
news:4dghg1dq6t2bspvl89tbn8ei013pkskung@4ax.com...
> On Sun, 21 Aug 2005 08:54:07 +0100, "Lindsay" <me@home.com> wrote:
>
>>I have a DLL which has a Hook function. My app loads the initial instance
>>of
>>the DLL and calls an initialize function to start the hook etc. This hook
>>is
>>a system wide hook and can attach to all sorts of window (not belonging to
>>my app). If I end my app, first calling another function to end the hooks,
>>the other DLL instances are still there. Is there a way to end all
>>instances
>>of the DLL in one go?
>
> I had the same problem, and I eventually came up with the method below,
> which I use in Wheeler after uninstalling a global mouse hook:
>
>
http://www.eluent.com/wheeler.htm
>
> // The following helps hooked applications unmap the hook DLL.
> DWORD_PTR res;
> SendMessageTimeout(HWND_BROADCAST, WM_NULL,
> 0, 0, SMTO_NORMAL, 1000, &res);
>
> --
> Doug Harrison
> VC++ MVP