This is a fork of the EasyHook project.
EasyHook supports extending (hooking) unmanaged code (APIs) with pure managed ones, from within a fully managed environment on both 32-bit and 64-bit versions of Windows Vista x64, Windows Server 2008 x64, Windows 7, Windows 8.1, Windows 10, and Windows 11.
EasyHook currently supports injecting assemblies built for .NET Framework 4.0+ and can inject native DLLs.
For more information head to the EasyHook site at easyhook.github.io
For native C++ apps there is also a native NuGet package: nuget.org/packages/EasyHookNativePackages
Reporting bugs is the only way to get them fixed and help other users of the library! If an issue isn't getting addressed, try raising a bounty for it.
Report issues at github.com/EasyHook.
Requirements:
- Visual Studio 2019 or later
- MSBuild Community Tasks
- Windows 8.1 SDK
- C++ ATL for latest v142 build tools (x86 & x64)
You need to install the Windows Driver Kit (WDK) for your version of windows. See Download the Windows Driver Kit (WDK) - Windows drivers | Microsoft Learn for up-to-date steps.
These are the steps for Windows 11:
- Install Visual Studio 2022
- Install Windows SDK
- Install WDK
Use build.bat to build binaries for all configurations (.NET 4.0, Debug/Release, and x86/x64).
./Debug/x86./Debug/x64./Release/x86./Release/x64
Use build-package.bat to set version information, build binaries for all
configurations and ZIP Release builds and Source within ./Deploy.
Generates archives:
./Deploy/EasyHook-#.#.#.#-Binaries.zip./Deploy/EasyHook-#.#.#.#-Source.zip
Containing the following files:
./Deploy/NetFX4.0/*./Deploy/Source/*
You can download and install easyhook using the vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.gitcd vcpkg./bootstrap-vcpkg.sh./vcpkg integrate installvcpkg install easyhook
The easyhook port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.
EasyHook includes the UDIS86 library Copyright (c) 2002-2012, Vivek Thampi [email protected]. See udis86-LICENSE.txt for license details. Minor modifications have been made for it to compile with EasyHook.
More information about UDIS86 can be found at github.com/vmt/udis86.