Skip to content
EntityQ1203383· pop 17· linked from 61 articles

Also known as hooks

In computer programming, hooking is a range of techniques used to alter or augment the behaviour of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components. Code that handles such intercepted function calls, events or messages is called a hook.

Wikidata facts

Show 1 more fact
Stack Exchange tag
stackoverflow.com/tags/hook
Sources (1)

via Wikidata · CC0

~20 min read

Article

18 sections
Contents
  • Methods
  • Source modification
  • Symbol wrapping
  • Runtime modification
  • Sample code
  • Virtual method table hooking
  • C# keyboard event hook
  • API/function hooking/interception using JMP instruction aka splicing
  • Netfilter hook
  • Internal IAT hooking
  • See also
  • References
  • External links
  • Windows
  • Linux
  • Emacs
  • OS X and iOS
  • In Depth API Hooking

In computer programming, hooking is a range of techniques used to alter or augment the behaviour of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components. Code that handles such intercepted function calls, events or messages is called a hook.

Hook methods are of particular importance in the template method pattern where common code in an abstract class can be augmented by custom code in a subclass. In this case each hook method is defined in the abstract class with an empty implementation which then allows a different implementation to be supplied in each concrete subclass.

Connections

Categories