spud - multi-architecture cross-platform hooking library.
- x86-64 and arm64 support
- Windows, Mac and Linux support
Clone repository to subfolder and link spud
to your project:
add_subdirectory(path/to/spud)
target_link_libraries(your-project-name PRIVATE spud)
- Simple example
void test_function(int n);
decltype(test_function) *o_test_function = nullptr;
SPUD_NO_INLINE void test_function(int n) {
if (n == 0) {
condition_intact_for_hook = true;
return;
}
}
o_test_function = SPUD_STATIC_DETOUR(test_function, hook);
spud
can be easily added to any cmake-based project. Just add a few lines in CMakeLists.txt
.
- No documentation (yet)
- Easy way to patch VTables
- A lot more stuff
- MIT