What all dlls to be included to main application for hooking

c++ / delphi package - dll injection and api hooking
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I asked for the *dll* file. Please send me the dll.

I tried to compile your dll with MSVC++ 6. But there are lots of errors. I was not able to compile it successfully.
Sanjeev
Posts: 16
Joined: Wed Jun 09, 2004 3:51 pm

Post by Sanjeev »

It was compiled in MSVC 7 not in MSVC 6. I have sent you dll also.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Does your win9x installation have msvcr71.dll installed? Your hook dll statically links to that, which is not really a good idea. I'd suggest to use pure win32 APIs instead of using that library (if possible).

Are you sure that the hook dll complains about madCHook.dll and not about that msvcr71.dll? Can you make a screenshot of the error box in win9x?
Sanjeev
Posts: 16
Joined: Wed Jun 09, 2004 3:51 pm

Post by Sanjeev »

Thanks a lot for your help. I used your example which was installed with Madhook SDK. I just modified the code to work according to our rquirement. I think it is also in MSVC 7. Can you please send me an example which does not use the msvc7 library.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

My original HookProcessCreation example does not use the msvc7 library!

Remove these two:

#include <stdio.h>
#include <stdlib.h>

Then replace what MSVC complains about with pure win32 APIs. Use CreateFile instead of fopen etc. Afterwards your dll should not link to the mscc7 library, anymore.
Sanjeev
Posts: 16
Joined: Wed Jun 09, 2004 3:51 pm

Post by Sanjeev »

Thanks a lot. Your support is very good. I got it worked. This all was just because of my sily mistake.

But I dont know why the error did not come when I copied madchook.dll in system directory. I'll check it my own. Once again thank you. :D

Sanjeev
Post Reply