diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2011-03-01 07:19:20 +0300 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2011-03-04 02:48:23 +0300 |
commit | 05096f71cc2c1286dd3a3bfe7b443b6d52bdf950 (patch) | |
tree | 317bd037c8b1aba2955b0fb4dbda0fe52e022c3a /overlay/HardHook.h | |
parent | 630d71267d77348199acf4192488231118d982d9 (diff) |
Add some comments to hooking code
Diffstat (limited to 'overlay/HardHook.h')
-rw-r--r-- | overlay/HardHook.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/overlay/HardHook.h b/overlay/HardHook.h index 86488092a..a40ca35ad 100644 --- a/overlay/HardHook.h +++ b/overlay/HardHook.h @@ -47,13 +47,19 @@ typedef void *(*voidFunc)(); struct HardHook { + // Pointer to the place in the original code where replacements happen unsigned char *baseptr; unsigned char orig[6]; unsigned char replace[6]; + // Remembers whether there is a trampoline in place in the target code or + // whether restore -> call orig. -> replace has to be used for every intercepted call bool bTrampoline; + // Points to the (rest of the) original function when used from the injected function voidFunc call; + // Pointer to executable code page that holds all trampoline codes static void *pCode; + // Offset to next unused addr in pCode static unsigned int uiCode; HardHook(); |