Global WH_CBT hook DLL is loaded into some processes only
Posted
by kriau
on Stack Overflow
See other posts from Stack Overflow
or by kriau
Published on 2010-03-21T16:36:58Z
Indexed on
2010/03/21
16:41 UTC
Read the original article
Hit count: 454
The main program calls the function SetHook in the wi.dll to install global WH_CBT hook.
bool WI_API SetHook()
{
if (!g_hHook)
{
g_hHook = SetWindowsHookEx(WH_CBT, (HOOKPROC) CBTProc, g_hInstDll, 0);
}
return g_hHook != NULL;
}
I presume after installing global hook, wi.dll should be loaded into each process' address space. However wi.dll is loaded in to some processes only. For example, if I start Skype, MS Word I can see that wi.dll is loaded into these processes as well (using Process Explorer), however if I run Firefox, uTorrent, Adobe Reader then wi.dll is not loaded into these processes.
I'm using W7 64-bit, main program and wi.dll is 32-bit, all programs mentioned here is 32-bit programs as well.
Any ideas why that happens?
Thanks in advance.
© Stack Overflow or respective owner