Protect a process (anti-cheat)
Hello,
To Be concise:
Why:
I´m doing a anti-cheat to a game and this game have a launcher, but after laucher open the game process someone can close the launcher and modify the game.
I Need:
To protect the game my launcher can´t be closed. If someone close it the game must be closed to.
..........
I tried with setparent, but the game is fullscreen.
(sorry by English)
Re: Protect a process (anti-cheat)
Just use an api to get the state of the process, if the process is closed, then have the main program reopen it.
Re: Protect a process (anti-cheat)
the game process isn't my, and i need keep the launcher open.
I have game.exe file executed by launcher, if cheater kill launcher process he can do what he want with it.
I need
1- Open Game Process (Done: shell or shellexecute)
2- Keep launcher process open
If launcher was killed (taskkill) Game must be closed also
when i uset set parent work (i close the main window and game closed also).
An API to change this fullscreen to Window Mode can resolve my problem, but i can´t find one.
thanks
Re: Protect a process (anti-cheat)
An idea is to use 2 apps, one that launches the game and the other one to monitor if the launcher is closed, or that the two apps monitor one another, if one is closed then close the game.
Re: Protect a process (anti-cheat)
i prefer leave it like a B Plan, the cheater can simply create a .bat
Taskkill -im "app1"
Taskkill -im "app2"
and I dont have time to react :sick:
Re: Protect a process (anti-cheat)
I believe we can only close one app at a time (someone correct me if I am wrong), if app1 is closed then still app2 can react.
Re: Protect a process (anti-cheat)
you´re correct, but this interval is close, some milisseconds, how can i monitor with low latency, a timer with 10ms will cath much resouceres, and can cause LAG at game
Re: Protect a process (anti-cheat)
You can try hooking, that should be fast enough.
Re: Protect a process (anti-cheat)
can you explain better please?
i don't know this 'technique'
i saw once about Keyboard Hook, to capture keys to create shortcuts with my program at tray.
================================EDIT=====================================
I search for some info and find it.
http://msdn.microsoft.com/en-us/libr...90(VS.85).aspx
there is shown some of SetWindowsHookEx function.
There says that WH_CALLWNDPROC can show me windows messages BEFORE system send them.
Can i use it to close the game before my application recive close message?
Whold that works with Taskkill?
Or more.. i think to inject a procedure/sub/function IN game, that search by PID or HWND of launcher , if it´s close, execute : "taskkill GAME"? Can it work??
Sory by English and by Confusion, and THANKs for Help
PS:
pID or hWND of launcher, me.hwnd
pID or hWND of Game, the Shell funcion tell me, i Shell the game.