Uninstalling the hook in C++

Jun 23, 2009 at 9:06 AM

Hey!

I am using EasyHook in native C++, and everything works really awesome(!!!), but, I am having troubles uninstalling the hook when the application goes down.

To uninstall I am doing the following:

LhUninstallAllHooks();

for each HOOK_TRACE_INFO I'm using:
LhUninstallHook(hRegisterActiveObjectHook);
delete hRegisterActiveObjectHook;


After removing all the hooks:
LhWaitForPendingRemovals();

The problem is that although i removed the hook, my DLLs are still loaded into the target applications, and my functions are still being called.

Am I doing something wrong???

 

 

Thanks a lot !!!