Hooking in programming is a technique employing so called hooks to make a chain of procedures as a handler. Thus, after the handled event occurs, control flow follows the chain in specific order. New hook registers its own address as handler for the event and is expected to call the original handler at some point, usually at the end. Each hook is required to pass execution to the previous handler, eventually arriving to the default one, otherwise the chain is broken. Unregistering the hook means setting the original procedure as the event handler. Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. ... The word handler may refer to: a subroutine in computing -- especially an interrupt handler, signal handler or event handler asynchronous callback subroutine a manager or controller of an animal, of a player of sports such as a boxer, or of a spy This is a disambiguation page â a list of... In computer science and in computer programming, statements in pseudocode or in a program are normally obeyed (or executed) one after the other in the order in which they are written (sequential flow of control). ...
Hooking can be used for many purposes including debugging and extending original functionality, but also misused to inject (potentially malicious) code to the event handler.