@@ -23,7 +23,7 @@ include(FetchContent)
2323FetchContent_Declare(
2424 ByteWeaver
2525 GIT_REPOSITORY https://github.com/0xKate/ByteWeaver.git
26- GIT_TAG 0.3.21
26+ GIT_TAG 0.4.30
2727)
2828FetchContent_MakeAvailable(ByteWeaver)
2929
@@ -51,6 +51,8 @@ target_link_libraries(YOUR_PROJECT PRIVATE
5151
5252#### Use DetourMacros.hpp to quickly setup hooks.
5353~~~c++
54+ #include <DetourMacros.hpp>
55+
5456// Example hook of a __cdecl function.
5557DECLARE_HOOK(SomeFunc1, int, __cdecl, __cdecl, int a, int b, int c);
5658INSTALL_HOOK_ADDRESS(SomeFunc1, 0x1234);
@@ -63,6 +65,7 @@ void MemoryManager::ApplyByKey("SomeThisCallFunc1");
6365
6466// Example using symbols (funcname, modulename)
6567DECLARE_HOOK_THISCALL(SomeThisCallFunc1, int, __fastcall, int a, int b, int c);
68+ AddressDB::Add("SomeFunction", L"SomeModule.dll"); // Uses GetProcAddress to find the symbol.
6669AddressDB::AddWithScanPattern("SomeFunction", L"SomeModule.dll", "E9,00,00,00,00"); // Scan pattern.
6770AddressDB::AddWithKnownOffset("SomeFunction", L"SomeModule.dll", 0x00001234); // Offset from module base.
6871AddressDB::AddWithKnownAddress("SomeFunction", L"SomeModule.dll", 0x12345678); // Static address.
0 commit comments