Label: hook
A hook is a mechanism that intercepts function calls, events, or system operations and redirects them to custom code. Hooks are commonly used to monitor or modify program behavior at runtime. In low-level programming, a hook often replaces or patches the original function entry point with a callback handler. Operating systems and frameworks also provide official hook APIs for events such as keyboard input, window messages, or network activity. Hooks are widely used in debugging tools, profilers, plugins, accessibility software, and security products. They are also common in reverse engineering and game modding. Incorrect hook implementation can cause crashes, recursion problems, or security risks. Modern systems may restrict hooking techniques for security reasons.
Understanding hooks is important for systems programming, API interception, and runtime analysis.