very intersting problem!!!

c++ / delphi package - dll injection and api hooking
Post Reply
kofmaster
Posts: 4
Joined: Tue Jan 17, 2012 3:31 am

very intersting problem!!!

Post by kofmaster »

hi dear madshi and other delphi lovers :-)

i need a very strange problem. i use delphi 7 and windows 7 64 bit. i made a program with api hook. everything is ok when i use my program but i got a very interesting problem when i sent my program a friend. program gives crash when friend is open programme. i connect via teamviewer to friend pc to see this error. i opened my programme on his pc. its works very well !!! but doesnt work again when i disconnect his pc. or if anyone connect him pc via teamviewer, program works very well again ! so how can i solve this problem? i never see this problem until now...

i hooked exitprocess and my friends have windows 7 64 bit. why everthing is going ok if any one connect them pc via teamviewer? why program doesnt work on them pc without teamviewer connection? any idea?

thx from now for ur helps...
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: very intersting problem!!!

Post by madshi »

Hello,

not sure what's happening there. Have you tried using madExcept to track down the crash?
kofmaster
Posts: 4
Joined: Tue Jan 17, 2012 3:31 am

Re: very intersting problem!!!

Post by kofmaster »

why program works when someone connect to him pc via teamviewer? that is really interesting madshi. im trying other hook codes. works good on my pc again but having problems again on other pcs. i am going to mad lol
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: very intersting problem!!!

Post by madshi »

As I said: "not sure what's happening there".

Make sure you use the latest madCodeHook version. And if you get a crash, madExcept might help figuring out where/why it occurs, as mentioned in my previous comment.
kofmaster
Posts: 4
Joined: Tue Jan 17, 2012 3:31 am

Re: very intersting problem!!!

Post by kofmaster »

i found the real problem. but i still dont know how can i fix it. my video card is ati and i use atitray tools. program doesnt work when i close atitray on system tray.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: very intersting problem!!!

Post by madshi »

I don't see what that could have to do with madCodeHook, though.
kofmaster
Posts: 4
Joined: Tue Jan 17, 2012 3:31 am

Re: very intersting problem!!!

Post by kofmaster »

i tried all hookapi modules but same problem. i guess atitraytools hooking something on system or anything. then program works very well until i close atitray lol no one can solve this problem if u cant solve madshi :D
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: very intersting problem!!!

Post by madshi »

I can't solve anything if I don't have the necessary information. You've told me pretty much nothing so far. I don't know which madCodeHook version you're using. I don't know if you're using system/session/user wide DLL injection or if you're using SetWindowsHookEx for injection or if you're injecting just one or a number of a specific processes. I don't know which APIs you're hooking. I don't know what you're doing in your hook callback. Etc etc...

The first thing you may want to try out is to remove all hooking from your application. Then add it back in step by step. First step would be to inject an empty dll. Next step would be to inject a dll with madCodeHook in the uses clause but without any code. Next step would be with API hooks, but leave all hook callback functions empty. Next step would be to fill in one hook callback function after the other. You need to locate what exactly is causing the problem.
Post Reply