madCHook v2.1.2.0 - ICQ.exe = 100% CPU Usage.

c++ / delphi package - dll injection and api hooking

madCHook v2.1.2.0 - ICQ.exe = 100% CPU Usage.

Postby hmemcpy » Fri Jun 04, 2004 4:56 pm

Hello madshi, and fellow developers.

Some time ago I posted a link to a tool which is sort of a debugger for ICQ, called ICQMenace (http://forum.madshi.net/viewtopic.php?t=19).

ICQMenace comes with source included, and contains MadCodeHookLib v1.3.0.11. With this version, the tool works perfect. However, changed to v2.1.2.0 (replacing, of course, the madCHook.pas as well), upon executing, the hooked file (icq.exe) is using 100% of the CPU.

Does anyone have an explanation for this? Perhaps one of the options in the madCHook.pas?

PS: The DLL is being used in both ICQMenace.exe, and ICQMenace.dll (seperate dir in the source code) - when compiling - keep in mind.

PS 2: I'm using Delphi 7 if that matters.

Thank you in advance.
hmemcpy
 
Posts: 12
Joined: Tue Apr 20, 2004 11:47 pm

Postby madshi » Fri Jun 04, 2004 5:28 pm

I've had a quick glance at the hook dll's source code, but I can't tell what's wrong. Clearly the logging isn't thread safe, that might be problem - but then it should also make problems with the older madCHook version.

If you want to get this solved, you can either ask the author of the program to check the problem out (I simply don't have the time for that), or you can have a go at it yourself. First of all I'd suggest to comment the API hooks. If the freeze is gone, then put the hooks back in, but remove all code from the API hook callback functions - except the call to the next hook. If you still see no freeze, put the callback code back in, but one API after the other, until you find the guilty one.

I'm willing to help finding the problem, but I don't have the time to do all the work myself, I'm sorry...
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm


Return to madCodeHook

Who is online

Users browsing this forum: No registered users and 4 guests

cron