A small project to help hooking Diablo2 .dlls
This project is using Detours to patch functions.
It is also using fmt (as a git submodule, clone this repository recursively or use git submodule update --init after clone).
Start by building D2.Detours.dll and D2.DetoursLauncher using CMake.
# Configure the CMake project
cmake -A Win32 -B build
# Build the release config
cmake --build build --config Release
# Install
cmake --install build --config Release --prefix YOUR_INSTALL_FOLDERThen use D2.DetoursLauncher to inject the detours dll into the Diablo II process of your choice.
For example if you are using D2SE mod manager:
D2.DetoursLauncher.exe D2SE.exeYou may pass arguments to the game by adding them after a -- parameter.
For example:
D2.DetoursLauncher.exe -- -skiptobnet -wNote that it will spawn D2SE.exe as a subprocess, so you might be interested in the following Visual Studio extension Microsoft Child Process Debugging Power Tool. Then go to Debug > Other debug targets > Child process debugging settings, enable & save.
- CMake (buildsystem)
- Visual Studio (compiler)