A Delphi and Free Pascal library for hooking functions and methods, including Windows API, COM interfaces, and object methods.
DDetours is a library for hooking functions and methods in Delphi and Free Pascal applications, including Windows API calls, COM interfaces, and object methods. It allows developers to intercept, modify, or monitor function calls at runtime, which is useful for debugging, profiling, or extending software without altering original source code.
Delphi and Free Pascal developers working on low-level programming, debugging tools, or software that requires runtime function interception, such as security software, performance monitors, or legacy system extensions.
Developers choose DDetours for its pure Pascal implementation, broad compiler support, and comprehensive features like multi-hooking, thread safety, and integrated instruction decoding, offering a robust and self-contained solution for function hooking without external dependencies.
Delphi Detours Library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports both x86 and x64 systems, as stated in the README, ensuring compatibility with modern Windows environments without external dependencies.
Works with Delphi 7 through Delphi 10.3 and Lazarus/Free Pascal, covering a wide range of legacy and current Pascal compilers for flexible deployment.
Enables hooking of object methods, COM interfaces, and Windows API functions with multiple hooks per function, as per the README, allowing layered interception.
The README notes that hooking and unhooking are designed to be safe in multithreaded environments, reducing concurrency risks in complex applications.
Includes the InstDecode library for decoding x86/x64 instructions, providing low-level control and disassembly capabilities without external tools.
Focused solely on Windows and x86/x64 architectures, with no support for other operating systems or CPU types like ARM, restricting cross-platform use.
The README lists support only up to Delphi 10.3 (Rio), missing newer versions such as Delphi 11 and 12, which may limit adoption in modern projects.
Function hooking requires deep knowledge of Pascal internals and Windows API, making it challenging for developers without low-level programming experience.
As with any hooking library, improper use can lead to crashes or unpredictable behavior, especially in production where stability is critical, and the README lacks detailed error-handling guidance.