Update README.md

master
xerox 5 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. Installing the hook/Init.
```cpp ```cpp
Hook::Install( hook::install(
(uintptr_t) &WriteFile, //address to put inline hook at. &WriteFile, //address to put inline hook at.
(uintptr_t) &HookWriteFile //address to jmp too. &HookWriteFile //address to jmp too.
); );
``` ```
Disabling the hook so you can call the original function. Disabling the hook so you can call the original function.
```cpp ```cpp
Hook::Disable((uintptr_t)&WriteFile); hook::disable(&WriteFile);
WriteFile(.....) WriteFile(.....)
``` ```
Enabling the hook. Enabling the hook.
``` ```
Hook::Enable((uintptr_t)&WriteFile); hook::enable(&WriteFile);
``` ```
# info # 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! 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