Skip to content
Delphi Detours Library
Branch: master
Clone or download
MahdiSafsafi Merge pull request #54 from MikeRohsoft/master
Long overdue FPC 64bit Support
Latest commit f56090a Jan 27, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
Demo Fix relative path for demos. Oct 11, 2016
Source Merge pull request #54 from MikeRohsoft/master Jan 27, 2019
.gitignore Added gitignore file. Jun 27, 2016
Clean.bat Repository refactoring. Jun 27, 2016 updated copyright. Jan 20, 2019

Version License Lang

The Delphi Detours Library is a library allowing you to hook Delphi and Windows API functions. It provides an easy way to insert and remove hook.

What's new in Version 2:

Please check Version2 wiki page

Features :

  • Support x86 and x64 architecture.
  • Allow calling the original function via Trampoline function.
  • Support for Multi Hook.
  • COM/Interfaces/win32api support.
  • Support hooking interfaces methods by MethodName or MethodIndex.
  • Support COM vtable patching.
  • Fully thread-safe code hooking and unhooking.
  • Support hooking Object Method.
  • Support Delphi 7/2005-2010/XE-Rio(Delphi 10.3).
  • Support Lazarus/FPC.
  • 64 bit address is supported.
  • The library does not use any external library.
  • The library can insert and remove the hook at any time.
  • The library contains InstDecode library, that allow to you to decode CPU instructions (x86 & x64).

This project contains two sub projects : The Detours Library and the InstDecode library.

The InstDecode Library is a library that can decode both (x86-x64) instructions. You can consider it as a small disassembler routine. It can decode instruction and getting information about the instruction (size of instruction,displacement,immediate data, jump address,..) without displaying mnemonics making it very faster and small in compiled size.

These two libraries were coded in pure Pascal language with Delphi XE7.

See the Wiki page for more information about how to use the library.

Please, if you find any bug, feel free to report it.

You can’t perform that action at this time.