Update README.md

master
xerox 4 years ago
parent 2013335c63
commit fe559131a9

@ -6,24 +6,24 @@ An inline hooking library for windows. I had issues with other public hooking li
Installing the hook/Init.
```cpp
Hook::Install(
(uintptr_t) &WriteFile, //address to put inline hook at.
(uintptr_t) &HookWriteFile //address to jmp too.
hook::install(
&WriteFile, //address to put inline hook at.
&HookWriteFile //address to jmp too.
);
```
Disabling the hook so you can call the original function.
```cpp
Hook::Disable((uintptr_t)&WriteFile);
hook::disable(&WriteFile);
WriteFile(.....)
```
Enabling the hook.
```
Hook::Enable((uintptr_t)&WriteFile);
hook::enable(&WriteFile);
```
# info
All hooks are stored inside of a `std::map<uintptr_t, std::unique_ptr<Detour>>` for quick and easy access to each object. All functions
All hooks are stored inside of a `std::map<uintptr_t, std::unique_ptr<detour>>` for quick and easy access to each object. All functions
interacting with this vector will use the address of the inline hook as the key so mak sure the address is easy to access in your code!
Loading…
Cancel
Save