Is there any debug/prepossessing param or any option under Windows 7 and visual studio to prevent from other processes hooking to my process?
I am writing a game for Windows, under Visual Studio, and was wondering if there is a way to disable user to hook to the game's process?
A hook is a point in the system message-handling mechanism where an application can install a subroutine to monitor the message traffic in the system and process certain types of messages before they reach the target window procedure.
A hook is a mechanism by which an application can intercept events, such as messages, mouse actions, and keystrokes. A function that intercepts a particular type of event is known as a hook procedure. A hook procedure can act on each event it receives, and then modify or discard the event.
Application hooks are objects that can be applied like procedures. Each application hook has two parts: a procedure that specifies what to do when the application hook is applied, and an arbitrary object, called extra. Often the procedure uses the extra object to determine what to do.
In programming, a hook is a place and usually an interface provided in packaged code that allows a programmer to insert customized programming. For example, a programmer might want to provide code that analyzed how often a particular logic path was taken within a program.
No, that's not possible. Even if you could somehow disable hooking, the user could still attach a debugger to your process and do anything they wanted. That's by design, of course: it's how you debug the problem when you write it.
Once a user has installed a program on their machine, assuming they have sufficient privileges, they have full control over that program. Trying to limit it programmatically is a fool's errand.
The solution to this program is not to be found with code. You need to investigate the built-in Windows security model, like creating limited user accounts; ask more questions about that on Server Fault.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With