Hello. I got a small problem and no idea how to resolve it. I launch game, then .exe injector which injects DLL into the game. This is a windows form app. I need this dll to get HWND of the window he is injected into. Now using FindWindow because i want to run multiple games with bot inside it, so every bot has to detect its OWN client. How to? I need to PostMessage using HWND
Right now i can hook CreateWindowEx to het the HWND, but do you know any simpler way?
Last edited by Szaka; 08-19-2013 at 08:08 AM.
I triend and it seems to work wrong in my case. What im trying to do now, is to get HWNDs of all windows with same PID and compare Title text, that will work for sure
Edit: Bingo, works
Last edited by Szaka; 08-19-2013 at 09:18 AM.
I did this in my window hook code that I posted a while back. Since I was already hooking CreateDevice I let the target application give me it's main window handle.