DLL Injection

c++ / delphi package - dll injection and api hooking
Post Reply
Mr. FancyPants
Posts: 17
Joined: Sun May 30, 2004 1:27 pm

DLL Injection

Post by Mr. FancyPants »

Hi, I have a problem with my DLL. Injecting the DLL into the process works fine, but when I try to show a form that's located in the dll, it doesn't show up (actually it does, but it dissappears right after that). It works fine when I use ShowModal instead of Show, but that's not what i need. I know this doesn't have much to do with madCodeHook itself, but I would be glad if you could help. It's probably some stupid thingy i forgot. (I'm such a n00b :o )

I have another question, when you have injected the DLL, how do you call the functions within the injected DLL.

Thanks in advance.
nildo
Posts: 249
Joined: Mon Mar 22, 2004 11:32 am
Contact:

Post by nildo »

You should Never use VCL into a Hook DLL.
Mr. FancyPants
Posts: 17
Joined: Sun May 30, 2004 1:27 pm

Post by Mr. FancyPants »

I know, but how should I do it then?
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

nildo is right, don't use the VCL. Instead use MessageBox. Or build your own dialogs by using CreateWindow and that stuff. It's quite hard work, though.

What do you mean with "when you have injected the DLL, how do you call the functions within the injected DLL"? What exactly do you want to do?
Mr. FancyPants
Posts: 17
Joined: Sun May 30, 2004 1:27 pm

Post by Mr. FancyPants »

Never mind, I don't think this is gonna work anyway. Actually, what I really want to know is how to show my form in the context of another process. So it will stay on top, even if the (DirectX) target application uses full screen mode. I'd better not use hooks, since it might get me banned from the game (it's not an illegal tool like an aimbot, but PunkBuster doesn't seem to like any kind of hook) and i'm too n00bish to code raw API.
So, I would like to know if there is a way to show my form on top of everything (including full screen applications), even if it looses focus.

I would be very happy if anyone could tell me :D
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I think a normal top most form is *not* shown above a DirectX full screen game. I guess you have to directly draw to the DirectX surfaces if you want your output to be visible. That's not going to be funny, though, it will be quite hard to realize... :(
Mr. FancyPants
Posts: 17
Joined: Sun May 30, 2004 1:27 pm

Post by Mr. FancyPants »

Thanx Madshi, but I guess I have to find some other way, because my programming skills aren't good enough.
nildo
Posts: 249
Joined: Mon Mar 22, 2004 11:32 am
Contact:

Post by nildo »

HUm, you will not be allowed to hook it. Since PunkBuster can detect it. I got the same problem when hooking Counter Strike's OpenGL. Cheating Death does not allow :crazy:
Post Reply