Results 1 to 9 of 9

Thread: Protect a process (anti-cheat)

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2009
    Posts
    33

    Question 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)

  2. #2
    Fanatic Member Mxjerrett's Avatar
    Join Date
    Apr 2006
    Location
    Oklahoma
    Posts
    939

    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.

    If a post has been helpful please rate it.
    If your question has been answered, pull down the tread tools and mark it as resolved.

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2009
    Posts
    33

    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

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    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.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2009
    Posts
    33

    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

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    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.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7

    Thread Starter
    Member
    Join Date
    Jul 2009
    Posts
    33

    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

  8. #8
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Protect a process (anti-cheat)

    You can try hooking, that should be fast enough.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  9. #9

    Thread Starter
    Member
    Join Date
    Jul 2009
    Posts
    33

    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.
    Last edited by h2so4; Nov 19th, 2009 at 09:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width